|
[#684] |
project: compiler |
priority: low |
category: bug |
|
submitter |
assigned to |
status |
date submitted |
|
Sean |
Martin |
fixed |
2006-07-31 14:42:23.0 |
subject |
traits don't work well with typecase |
code |
package test;
trait Test {
trait Ti;
class Foo;
def foo(t : Ti) = t match {
case t : Foo => true;
case _ => false;
}
class Bar extends Foo with Ti;
assert(foo(new Bar));
}
|
what happened |
found : Test.this.Foo
required: Test.this.Ti
|
what expected |
No type error. Work around: use isInstanceOf/asInstanceOf instead of typecase.
|
[back to overview] |