summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJosh Suereth <Joshua.Suereth@gmail.com>2012-06-08 13:23:16 -0700
committerJosh Suereth <Joshua.Suereth@gmail.com>2012-06-08 13:23:16 -0700
commit8bc3352573bb8cd7e993608697e02f1fefd50ec1 (patch)
treeb7542e51fa406b5b91553b0b85764a662523340f /test
parent59f0214e5d8603572f50514666ec24e274747369 (diff)
parent09bf95675b06a0912ab1e3c8cdcab9a19eca48d4 (diff)
downloadscala-8bc3352573bb8cd7e993608697e02f1fefd50ec1.tar.gz
scala-8bc3352573bb8cd7e993608697e02f1fefd50ec1.tar.bz2
scala-8bc3352573bb8cd7e993608697e02f1fefd50ec1.zip
Merge pull request #660 from retronym/ticket/5167-3
SI-5167 An impl class method should refer to its own parameter symbols.
Diffstat (limited to 'test')
-rw-r--r--test/files/res/t5167.check4
-rw-r--r--test/files/res/t5167.res2
-rw-r--r--test/files/res/t5167/t5167_1.scala12
-rw-r--r--test/files/res/t5167/t5167_2.scala7
4 files changed, 25 insertions, 0 deletions
diff --git a/test/files/res/t5167.check b/test/files/res/t5167.check
new file mode 100644
index 0000000000..6cf64f734b
--- /dev/null
+++ b/test/files/res/t5167.check
@@ -0,0 +1,4 @@
+
+nsc>
+nsc>
+nsc>
diff --git a/test/files/res/t5167.res b/test/files/res/t5167.res
new file mode 100644
index 0000000000..a485cbee41
--- /dev/null
+++ b/test/files/res/t5167.res
@@ -0,0 +1,2 @@
+t5167/t5167_1.scala
+t5167/t5167_2.scala \ No newline at end of file
diff --git a/test/files/res/t5167/t5167_1.scala b/test/files/res/t5167/t5167_1.scala
new file mode 100644
index 0000000000..ed28243507
--- /dev/null
+++ b/test/files/res/t5167/t5167_1.scala
@@ -0,0 +1,12 @@
+package compilerbug
+
+trait SadTrait {
+ def buggyMethod[T](argWithDefault1: Int = 0)(argWithDefault2: String = "default") {
+ for (i <- 0 to 1) {
+ val x = argWithDefault1
+ val y = argWithDefault2
+ }
+ }
+}
+
+object SadObject extends SadTrait
diff --git a/test/files/res/t5167/t5167_2.scala b/test/files/res/t5167/t5167_2.scala
new file mode 100644
index 0000000000..5aa56efe75
--- /dev/null
+++ b/test/files/res/t5167/t5167_2.scala
@@ -0,0 +1,7 @@
+package compilerbug
+
+class TestClass {
+ def repro() {
+ SadObject.buggyMethod[Int]()()
+ }
+}