|
[#724] |
project: compiler |
priority: low |
category: bug |
|
submitter |
assigned to |
status |
date submitted |
|
Sean |
Martin |
fixed |
2006-09-04 20:15:56.0 |
subject |
useless imports still not rejected |
code |
// Three files:
// test0/Symbols.scala
package test0;
trait Symbols {}
// test0/main.scala
package test0;
import test1.Symbols;
object main {
var syms : Symbols = null;
syms.foo;
}
// test1/Symbols.scala
package test1;
trait Symbols {
def foo : Int;
}
|
what happened |
syms in main.scala resolves to type of test0.Symbols, not test1.Symbols.
|
what expected |
either syms should resolve to type of test1.Symbols, or the import at the top of main.scala should be rejected as useless (not sure what the actual scope rules should be).
|
[back to overview] |