]> source.dussan.org Git - aspectj.git/commitdiff
476245: compile error already fixed in 1.8.7
authorAndy Clement <aclement@pivotal.io>
Fri, 4 Sep 2015 20:33:52 +0000 (13:33 -0700)
committerAndy Clement <aclement@pivotal.io>
Fri, 4 Sep 2015 20:33:52 +0000 (13:33 -0700)
tests/bugs187/476245/Testing.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc187/Ajc187Tests.java
tests/src/org/aspectj/systemtest/ajc187/ajc187.xml

diff --git a/tests/bugs187/476245/Testing.java b/tests/bugs187/476245/Testing.java
new file mode 100644 (file)
index 0000000..8b0bc8f
--- /dev/null
@@ -0,0 +1,10 @@
+import java.util.Optional;
+
+public class Testing {
+    public static void main(String[] args) {
+        Optional<Integer> value1 = Optional.of(15);
+        Optional<Integer> value2 = Optional.of(30);
+        boolean passed = value1.flatMap(v1 -> value2.map(v2 -> (v2 / v1) == 2)).orElse(false);
+        System.out.println(passed);
+    }
+}
index 3fce314bd73ce4a805e4e314def98b320ab4b6fb..754864fd719abacf15472be37a9bf91376db5d5e 100644 (file)
@@ -24,6 +24,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
  */
 public class Ajc187Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
 
+       public void testCompileError_476245() throws Exception {
+               runTest("compile error");
+       }
+
        public void testMissingJoinpoint_307147() throws Exception {
                runTest("missing joinpoint");
        }
index 19706f43a70def965a45b73c23cf96e98988054d..dfa22f6969fccae53511de036254a7e9dcfb38b1 100644 (file)
@@ -2,6 +2,10 @@
 
 <suite>
 
+<ajc-test dir="bugs187/476245" title="compile error">
+<compile files="Testing.java" options="-1.8"/>
+</ajc-test>
+
 <ajc-test dir="bugs187/307147" title="missing joinpoint">
 <compile files="Test.java TestAspect.aj ITDAspect.aj" options="-1.8"/>
 <run class="test.Test">