diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/t0259.check | 7 | ||||
-rw-r--r-- | test/files/neg/t0259.scala | 6 | ||||
-rw-r--r-- | test/files/pos/t0273.scala | 4 |
3 files changed, 17 insertions, 0 deletions
diff --git a/test/files/neg/t0259.check b/test/files/neg/t0259.check new file mode 100644 index 0000000000..8c6ce1d269 --- /dev/null +++ b/test/files/neg/t0259.check @@ -0,0 +1,7 @@ +t0259.scala:4: error: double definition: +constructor TestCase3:(String*)test.TestCase3 and +constructor TestCase3:((String, Int)*)test.TestCase3 at line 3 +have same type after erasure: (Seq)test.TestCase3 + def this( groups: String*) = this() + ^ +one error found diff --git a/test/files/neg/t0259.scala b/test/files/neg/t0259.scala new file mode 100644 index 0000000000..0975dec58e --- /dev/null +++ b/test/files/neg/t0259.scala @@ -0,0 +1,6 @@ +package test; +class TestCase3() { + def this( groups: (String, Int)*) = this() + def this( groups: String*) = this() +} +object Main extends TestCase3 with Application diff --git a/test/files/pos/t0273.scala b/test/files/pos/t0273.scala new file mode 100644 index 0000000000..de94829e8b --- /dev/null +++ b/test/files/pos/t0273.scala @@ -0,0 +1,4 @@ +object Test { +def a = () => () +def a[T] = (p:A) => () +} |