From 11783c3c2a6692cfbb41b14734504b86101ed955 Mon Sep 17 00:00:00 2001 From: Simon Ochsenreither Date: Thu, 7 Jan 2016 19:07:45 +0100 Subject: 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 --- test/files/neg/t8700a/Foo.java | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 test/files/neg/t8700a/Foo.java (limited to 'test/files/neg/t8700a/Foo.java') diff --git a/test/files/neg/t8700a/Foo.java b/test/files/neg/t8700a/Foo.java new file mode 100644 index 0000000000..cc8e9daf1f --- /dev/null +++ b/test/files/neg/t8700a/Foo.java @@ -0,0 +1,4 @@ +public enum Foo { + A, + B +} -- cgit v1.2.3