aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/typealias_dubious.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/pos/typealias_dubious.scala')
-rw-r--r--tests/untried/pos/typealias_dubious.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/untried/pos/typealias_dubious.scala b/tests/untried/pos/typealias_dubious.scala
new file mode 100644
index 000000000..cdba1a64d
--- /dev/null
+++ b/tests/untried/pos/typealias_dubious.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) = sys.error("foo")
+
+ def unstable: Actor = sys.error("foo")
+
+ def dubiousSend(msg: MailBox#Message) =
+ unstable.send(msg) // in.Message becomes unstable.Message, but that's ok since Message is a concrete type member
+}