I implemented Sean's "bug report", which is actually a feature request (SelfScope being a synonyme for "this"). I also rewrote the what happened, what expected fields. Now, after explicitouter, we have
temp0.isInstanceOf[ManagedScope.this.type]().&&({
exit(());
true
});
which is correct. However, after erasure, this becomes
temp0.$isInstanceOf[test.Test#ManagedScope]().&&({
exit(scala.runtime.BoxedUnit.UNIT);
true
});
which is incorrect -- I expect in many places that "z.instanceOf[something.this.type]" becomes "z eq something", so it's strange that this thing should be an exception.
It would be good if you could have a look, although I doubt anybody except Sean will ever notice the erroneous behavior.
|