diff options
author | Paul Phillips <paulp@improving.org> | 2012-09-28 22:03:39 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-01-30 03:50:28 -0800 |
commit | 77ec4ef5210c4f023a07c1d719806c4d7231cf09 (patch) | |
tree | 3dee675bdcadfc23047c0304d748520e14c599d8 /test | |
parent | faca7ec04746ffa8031ae242bac82b2292e93924 (diff) | |
download | scala-77ec4ef5210c4f023a07c1d719806c4d7231cf09.tar.gz scala-77ec4ef5210c4f023a07c1d719806c4d7231cf09.tar.bz2 scala-77ec4ef5210c4f023a07c1d719806c4d7231cf09.zip |
SI-5130, precision disappearing from refinement.
[backport]
Remove some code, win a prize.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/pos/t5130.scala | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/test/files/pos/t5130.scala b/test/files/pos/t5130.scala new file mode 100644 index 0000000000..676d3c7050 --- /dev/null +++ b/test/files/pos/t5130.scala @@ -0,0 +1,46 @@ +import scala.language.reflectiveCalls + +class A { + this_a => + + def b = new B + class B { def a: this_a.type = this_a } +} +trait A2 { def c = () } + +object Test { + val v1 = new A { def c = () } + val v2 = new A with A2 { } + val v3: A { def c: Unit } = null + def d1 = new A { def c = () } + def d2 = new A with A2 { } + def d3: A { def c: Unit } = null + var x1 = new A { def c = () } + var x2 = new A with A2 { } + var x3: A { def c: Unit } = null + + def main(args: Array[String]): Unit = { + val mv1 = new A { def c = () } + val mv2 = new A with A2 { } + val mv3: A { def c: Unit } = null + def md1 = new A { def c = () } + def md2 = new A with A2 { } + def md3: A { def c: Unit } = null + + v1.b.a.c + v2.b.a.c + v3.b.a.c + d1.b.a.c + d2.b.a.c + d3.b.a.c + x1.b.a.c + x2.b.a.c + x3.b.a.c + mv1.b.a.c + mv2.b.a.c + mv3.b.a.c + md1.b.a.c + md2.b.a.c + md3.b.a.c + } +} |