Skip to content

Commit 6bd80d0

Browse files
committed
Add a compile-fail test for attempts to extend non-objects.
1 parent 8e585e7 commit 6bd80d0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//error-pattern:x does not have object type
2+
use std;
3+
4+
fn main() {
5+
auto x = 3;
6+
7+
auto anon_obj = obj {
8+
fn foo() -> int {
9+
ret 3;
10+
}
11+
with x
12+
};
13+
}

0 commit comments

Comments
 (0)