diff options
Diffstat (limited to 'test/neg')
-rw-r--r-- | test/neg/overlapping.check | 6 | ||||
-rw-r--r-- | test/neg/overlapping.scala | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/neg/overlapping.check b/test/neg/overlapping.check new file mode 100644 index 0000000000..68251d32f7 --- /dev/null +++ b/test/neg/overlapping.check @@ -0,0 +1,6 @@ +overlapping.scala:9: overlapping overloaded alternatives; the two following alternatives of method foo have the same erasure: ()Any + alternative 1: def foo: X.this.I + alternative 2: def foo: X.this.J + def foo: J; + ^ +one error found diff --git a/test/neg/overlapping.scala b/test/neg/overlapping.scala new file mode 100644 index 0000000000..1c4a82ef79 --- /dev/null +++ b/test/neg/overlapping.scala @@ -0,0 +1,10 @@ +// Tests detection of overlapping erased signatures + +// $Id$ + +trait X { + type I; + type J; + def foo: I; + def foo: J; +} |