aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2015-09-04 13:33:52 -0700
committerAndy Clement <aclement@pivotal.io>2015-09-04 13:33:52 -0700
commit0095636d6bb3bf50d33104df7460f28ab3a76f4d (patch)
tree60b094154c49632f00b34910bc83ce9a6c23ecdc
parent2233cf023bce0168435795ab5747dae59fbd9a0d (diff)
downloadaspectj-0095636d6bb3bf50d33104df7460f28ab3a76f4d.tar.gz
aspectj-0095636d6bb3bf50d33104df7460f28ab3a76f4d.zip
476245: compile error already fixed in 1.8.7
-rw-r--r--tests/bugs187/476245/Testing.java10
-rw-r--r--tests/src/org/aspectj/systemtest/ajc187/Ajc187Tests.java4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc187/ajc187.xml4
3 files changed, 18 insertions, 0 deletions
diff --git a/tests/bugs187/476245/Testing.java b/tests/bugs187/476245/Testing.java
new file mode 100644
index 000000000..8b0bc8fb8
--- /dev/null
+++ b/tests/bugs187/476245/Testing.java
@@ -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);
+ }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc187/Ajc187Tests.java b/tests/src/org/aspectj/systemtest/ajc187/Ajc187Tests.java
index 3fce314bd..754864fd7 100644
--- a/tests/src/org/aspectj/systemtest/ajc187/Ajc187Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc187/Ajc187Tests.java
@@ -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");
}
diff --git a/tests/src/org/aspectj/systemtest/ajc187/ajc187.xml b/tests/src/org/aspectj/systemtest/ajc187/ajc187.xml
index 19706f43a..dfa22f696 100644
--- a/tests/src/org/aspectj/systemtest/ajc187/ajc187.xml
+++ b/tests/src/org/aspectj/systemtest/ajc187/ajc187.xml
@@ -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">