diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2014-10-06 17:17:45 +0200 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2014-10-06 17:17:45 +0200 |
commit | 8d25e84c9123fe9784ec9844b5184aa1b697b429 (patch) | |
tree | 4968b4991e0c57e5b3455114aceea03c002aba1d /test/files/neg | |
parent | 830425a06ffaed5441a44edbb8018ec4e231d59d (diff) | |
parent | 34b42d850c2201d0c6dc71fa8be8b56282c7de6a (diff) | |
download | scala-8d25e84c9123fe9784ec9844b5184aa1b697b429.tar.gz scala-8d25e84c9123fe9784ec9844b5184aa1b697b429.tar.bz2 scala-8d25e84c9123fe9784ec9844b5184aa1b697b429.zip |
Merge pull request #3954 from gbasler/ticket/7746-2.11
SI-7746 fix unspecifc non-exhaustiveness warnings and non-determinism in pattern matcher (2.11)
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/patmatexhaust.check | 2 | ||||
-rw-r--r-- | test/files/neg/patmatexhaust.flags | 2 | ||||
-rw-r--r-- | test/files/neg/patmatexhaust.scala | 2 | ||||
-rw-r--r-- | test/files/neg/t8430.check | 12 | ||||
-rw-r--r-- | test/files/neg/t8430.flags | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/test/files/neg/patmatexhaust.check b/test/files/neg/patmatexhaust.check index 2dad608451..bbf5e9b528 100644 --- a/test/files/neg/patmatexhaust.check +++ b/test/files/neg/patmatexhaust.check @@ -12,7 +12,7 @@ It would fail on the following inputs: (Kult(_), Kult(_)), (Qult(), Qult()) ^ patmatexhaust.scala:49: warning: match may not be exhaustive. It would fail on the following inputs: Gp(), Gu - def ma4(x:Deep) = x match { // missing cases: Gu, Gp + def ma4(x:Deep) = x match { // missing cases: Gu, Gp which is not abstract so must be included ^ patmatexhaust.scala:55: warning: unreachable code case _ if 1 == 0 => diff --git a/test/files/neg/patmatexhaust.flags b/test/files/neg/patmatexhaust.flags index 85d8eb2ba2..3b01ca062c 100644 --- a/test/files/neg/patmatexhaust.flags +++ b/test/files/neg/patmatexhaust.flags @@ -1 +1 @@ --Xfatal-warnings +-Xfatal-warnings -Ypatmat-exhaust-depth off
\ No newline at end of file diff --git a/test/files/neg/patmatexhaust.scala b/test/files/neg/patmatexhaust.scala index f937197829..26f0c12a91 100644 --- a/test/files/neg/patmatexhaust.scala +++ b/test/files/neg/patmatexhaust.scala @@ -46,7 +46,7 @@ class TestSealedExhaustive { // compile only case _ => } - def ma4(x:Deep) = x match { // missing cases: Gu, Gp + def ma4(x:Deep) = x match { // missing cases: Gu, Gp which is not abstract so must be included case Ga => } diff --git a/test/files/neg/t8430.check b/test/files/neg/t8430.check index 7c6a73ce53..dbc0c70bba 100644 --- a/test/files/neg/t8430.check +++ b/test/files/neg/t8430.check @@ -1,25 +1,25 @@ t8430.scala:15: warning: match may not be exhaustive. -It would fail on the following inputs: ??, LetC, LetF, LetL(IntLit), LetP +It would fail on the following inputs: LetC, LetF, LetL(BooleanLit), LetL(IntLit), LetL(UnitLit), LetP (tree: Tree) => tree match {case LetL(CharLit) => ??? } ^ t8430.scala:16: warning: match may not be exhaustive. -It would fail on the following inputs: ??, LetC, LetF, LetL(IntLit), LetP +It would fail on the following inputs: LetC, LetF, LetL(BooleanLit), LetL(IntLit), LetL(UnitLit), LetP (tree: Tree) => tree match {case LetL(CharLit) => ??? } ^ t8430.scala:17: warning: match may not be exhaustive. -It would fail on the following inputs: ??, LetC, LetF, LetL(IntLit), LetP +It would fail on the following inputs: LetC, LetF, LetL(BooleanLit), LetL(IntLit), LetL(UnitLit), LetP (tree: Tree) => tree match {case LetL(CharLit) => ??? } ^ t8430.scala:18: warning: match may not be exhaustive. -It would fail on the following inputs: ??, LetC, LetF, LetL(IntLit), LetP +It would fail on the following inputs: LetC, LetF, LetL(BooleanLit), LetL(IntLit), LetL(UnitLit), LetP (tree: Tree) => tree match {case LetL(CharLit) => ??? } ^ t8430.scala:19: warning: match may not be exhaustive. -It would fail on the following inputs: ??, LetC, LetF, LetL(IntLit), LetP +It would fail on the following inputs: LetC, LetF, LetL(BooleanLit), LetL(IntLit), LetL(UnitLit), LetP (tree: Tree) => tree match {case LetL(CharLit) => ??? } ^ t8430.scala:20: warning: match may not be exhaustive. -It would fail on the following inputs: ??, LetC, LetF, LetL(IntLit), LetP +It would fail on the following inputs: LetC, LetF, LetL(BooleanLit), LetL(IntLit), LetL(UnitLit), LetP (tree: Tree) => tree match {case LetL(CharLit) => ??? } ^ error: No warnings can be incurred under -Xfatal-warnings. diff --git a/test/files/neg/t8430.flags b/test/files/neg/t8430.flags index 85d8eb2ba2..6f60189a8d 100644 --- a/test/files/neg/t8430.flags +++ b/test/files/neg/t8430.flags @@ -1 +1 @@ --Xfatal-warnings +-Xfatal-warnings -Ypatmat-exhaust-depth off |