|
[#681] |
project: compiler |
priority: low |
category: bug |
|
submitter |
assigned to |
status |
date submitted |
|
Sean |
Martin |
fixed |
2006-07-31 14:37:19.0 |
subject |
useless import not flagged as error |
code |
package test;
class Foo {
val x : Int = 42;
}
object foo {
val x : String = "hello";
}
object test extends Foo {
import foo.x;
x;
} |
what happened |
the x reference in object test points to x in Foo even though foo.x was imported by name.
|
what expected |
If an import isn't useable (e.g., import foo.x), the compiler should emit a type error.
|
[back to overview] |