diff options
author | Martin Odersky <odersky@gmail.com> | 2007-11-01 17:35:15 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-11-01 17:35:15 +0000 |
commit | 3a4750825e3b3992adcddd4666f264d508e21f7a (patch) | |
tree | 1ed1eae169a180c46ceb23a3ab93a00d0e5deed0 /test/files/run | |
parent | b14c210baba254900b2b999b4c648526a5a7846e (diff) | |
download | scala-3a4750825e3b3992adcddd4666f264d508e21f7a.tar.gz scala-3a4750825e3b3992adcddd4666f264d508e21f7a.tar.bz2 scala-3a4750825e3b3992adcddd4666f264d508e21f7a.zip |
fixed ticket 91
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t091.check | 1 | ||||
-rw-r--r-- | test/files/run/t091.scala | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/test/files/run/t091.check b/test/files/run/t091.check new file mode 100644 index 0000000000..7ed6ff82de --- /dev/null +++ b/test/files/run/t091.check @@ -0,0 +1 @@ +5 diff --git a/test/files/run/t091.scala b/test/files/run/t091.scala new file mode 100644 index 0000000000..eaddde0dbf --- /dev/null +++ b/test/files/run/t091.scala @@ -0,0 +1,13 @@ +trait A { def x : Int } +trait B { val m : A } +object C extends B { + object m extends A { def x = 5 } +} +object Test { + // The type annotation here is necessary, otherwise + // the compiler would reference C$m$ directly. + def o : B = C + def main(argv : Array[String]) : Unit = { + println(o.m.x) + } +} |