From 7d79c4460814c9f8997de0fa1d756a734fb8a3d3 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Tue, 15 May 2012 15:07:24 +0200 Subject: Fix SI-5259 Calling the type checker on an Ident tree instead of using gen.mkAttributedRef assigns a SingleType to the tree. --- test/files/pos/t5259.scala | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/files/pos/t5259.scala (limited to 'test/files') diff --git a/test/files/pos/t5259.scala b/test/files/pos/t5259.scala new file mode 100644 index 0000000000..d33c4dd6a7 --- /dev/null +++ b/test/files/pos/t5259.scala @@ -0,0 +1,21 @@ +class A[T] +class B { + def m(a: A[this.type] = new A[this.type]) { } +} + +class C { + def foo(a: Int, b: Int = 0) = 0 + def foo() = 0 +} + +object Test { + def newB = new B + newB.m() + + val stableB = new B + stableB.m() + + def f { + println((new C).foo(0)) + } +} -- cgit v1.2.3