diff options
Diffstat (limited to 'test/files/neg/bug1010.scala')
-rw-r--r-- | test/files/neg/bug1010.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/neg/bug1010.scala b/test/files/neg/bug1010.scala new file mode 100644 index 0000000000..7a1e6615e5 --- /dev/null +++ b/test/files/neg/bug1010.scala @@ -0,0 +1,15 @@ +class MailBox { + class Message + //type Message = AnyRef +} + +abstract class Actor { + private val in = new MailBox + + def send(msg: in.Message) = error("foo") + + def unstable: Actor = error("foo") + + def dubiousSend(msg: MailBox#Message): Nothing = + unstable.send(msg) // in.Message becomes unstable.Message, but that's ok since Message is a concrete type member +} |