Closed
Description
Current master errors when there's a type with the same name as a module. The following used to compile fine on previous versions (including 0.4 and a little later):
use myfloat = core::f32;
type myfloat = f32; // without this
fn foo() -> myfloat { // this errors with: found typename used as variable
// ^~~~~~~
3_f32;
}
// but when adding it I get:
// error: unresolved name
// error: use of undeclared module 'myfloat'
// error: unresolved name myfloat::sqrt
// at the y = line
fn main() {
let x: f32 = 3_f32;
let y = myfloat::sqrt(x);
// ^~~~~~~~~~~~~
}