summaryrefslogtreecommitdiff
path: root/test/files/pos/t5259.scala
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2012-05-15 15:07:24 +0200
committerLukas Rytz <lukas.rytz@epfl.ch>2012-05-15 21:43:37 +0200
commit7d79c4460814c9f8997de0fa1d756a734fb8a3d3 (patch)
tree39ef01b4ebfdf0afabb3d2d3e568fde0bf16d428 /test/files/pos/t5259.scala
parentb3f7bc996b7a59b951cd0f199a056b6ad99d153b (diff)
downloadscala-7d79c4460814c9f8997de0fa1d756a734fb8a3d3.tar.gz
scala-7d79c4460814c9f8997de0fa1d756a734fb8a3d3.tar.bz2
scala-7d79c4460814c9f8997de0fa1d756a734fb8a3d3.zip
Fix SI-5259
Calling the type checker on an Ident tree instead of using gen.mkAttributedRef assigns a SingleType to the tree.
Diffstat (limited to 'test/files/pos/t5259.scala')
-rw-r--r--test/files/pos/t5259.scala21
1 files changed, 21 insertions, 0 deletions
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))
+ }
+}