diff options
Diffstat (limited to 'tests/patmat/aladdin1055')
-rw-r--r-- | tests/patmat/aladdin1055/A.scala | 6 | ||||
-rw-r--r-- | tests/patmat/aladdin1055/Test_1.scala.ignore | 5 | ||||
-rw-r--r-- | tests/patmat/aladdin1055/expected.check.ignore | 5 |
3 files changed, 16 insertions, 0 deletions
diff --git a/tests/patmat/aladdin1055/A.scala b/tests/patmat/aladdin1055/A.scala new file mode 100644 index 000000000..862336e30 --- /dev/null +++ b/tests/patmat/aladdin1055/A.scala @@ -0,0 +1,6 @@ +object A { + sealed trait T { def f: Int } + class TT extends T { def f = 0 } + + def foo = new T { def f = 1 } // local subclass of sealed trait T +} diff --git a/tests/patmat/aladdin1055/Test_1.scala.ignore b/tests/patmat/aladdin1055/Test_1.scala.ignore new file mode 100644 index 000000000..39d9b1dc9 --- /dev/null +++ b/tests/patmat/aladdin1055/Test_1.scala.ignore @@ -0,0 +1,5 @@ +object Test { + def foo(t: A.T) = t match { + case a: A.TT => 0 + } +} diff --git a/tests/patmat/aladdin1055/expected.check.ignore b/tests/patmat/aladdin1055/expected.check.ignore new file mode 100644 index 000000000..a8024ad02 --- /dev/null +++ b/tests/patmat/aladdin1055/expected.check.ignore @@ -0,0 +1,5 @@ +./tests/patmat/aladdin1055/Test_1.scala:2: warning: match may not be exhaustive. +It would fail on the following input: (_ : this.<local child>) + def foo(t: A.T) = t match { + ^ +one warning found |