2016-01-20 17:32:56 -06:00
|
|
|
// Test that the parser is error correcting missing idents. Despite a parsing
|
|
|
|
// error (or two), we still run type checking (and don't get extra errors there).
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let y = 42;
|
|
|
|
let x = y.; //~ ERROR unexpected token
|
|
|
|
let x = y.(); //~ ERROR unexpected token
|
2017-07-19 18:39:34 -05:00
|
|
|
//~^ ERROR expected function, found `{integer}`
|
2017-06-11 12:48:46 -05:00
|
|
|
let x = y.foo; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields [E061
|
2016-01-20 17:32:56 -06:00
|
|
|
}
|