Aladdin - Scala Bugtracking
[#1245] project: compiler priority: low category: bug
submitter assigned to status date submitted
Stephane Martin fixed 2007-07-26 14:20:28.0
subject unchecked warning with non-aliased structural types
code
object test extends Application {
  type T = { def hello() }
  val x: T = new { def hello() { println("5") } }
  println(x.isInstanceOf[T])               // no warning
  println(x.isInstanceOf[{ def hello() }]) // unchecked warning
}
what happened
test.scala:5: warning: refinement AnyRef{def hello(): Unit} in type is unchecked since it is eliminated by erasu\
re
  println(x.isInstanceOf[{ def hello() }])
                        ^
one warning found
what expected same behavior with both tests
[back to overview]
Changes of this bug report
Martin  edited on  2007-07-27 10:10:31.0