diff options
author | Simon Ochsenreither <simon@ochsenreither.de> | 2016-01-07 19:07:45 +0100 |
---|---|---|
committer | Simon Ochsenreither <simon@ochsenreither.de> | 2016-01-14 00:01:40 +0100 |
commit | 11783c3c2a6692cfbb41b14734504b86101ed955 (patch) | |
tree | 094d7e5b3155f2325e8d6d290772433b1382228e /test/files/neg/t8700a/Baz.java | |
parent | fb22e2b0a73605d654c153e02d454e5cec21f355 (diff) | |
download | scala-11783c3c2a6692cfbb41b14734504b86101ed955.tar.gz scala-11783c3c2a6692cfbb41b14734504b86101ed955.tar.bz2 scala-11783c3c2a6692cfbb41b14734504b86101ed955.zip |
SI-8700 Exhaustiveness warning for enums from Java source
Until now, the warning was only emitted for enums from Java class files.
This commit fixes it by
- aligning the flags set in JavaParsers with the flags set in
ClassfileParser (which are required by the pattern matcher to
even consider checking exhaustiveness)
- adding the enum members as childs to the class holding the enum
as done in ClassfileParser so that the pattern matcher sees the enum
members when looking for the sealed children of a type
Diffstat (limited to 'test/files/neg/t8700a/Baz.java')
-rw-r--r-- | test/files/neg/t8700a/Baz.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/neg/t8700a/Baz.java b/test/files/neg/t8700a/Baz.java new file mode 100644 index 0000000000..f85ad40802 --- /dev/null +++ b/test/files/neg/t8700a/Baz.java @@ -0,0 +1,11 @@ +public enum Baz { + A { + public void baz1() {} + }, + B { + public void baz1() {} + }; + + public abstract void baz1(); + public void baz2() {} +} |