Aladdin - Scala Bugtracking
[#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]
Changes of this bug report
Martin  edited on  2006-09-05 13:10:45.0
Hmm? There is no import in this code!
Sean  edited on  2006-09-05 13:48:25.0
Sorry, I copied the files in wrong before. Fixed now.
Martin  edited on  2006-09-21 12:31:12.0
You now get a warning.