Add a compile-fail test for attempts to extend non-objects.

This commit is contained in:
Lindsey Kuper 2011-07-06 10:47:36 -07:00
parent 8e585e7008
commit 6bd80d0121

View File

@ -0,0 +1,13 @@
//error-pattern:x does not have object type
use std;
fn main() {
auto x = 3;
auto anon_obj = obj {
fn foo() -> int {
ret 3;
}
with x
};
}