--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Operators.java Wed Jul 05 21:58:29 2017 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Operators.java Tue Jul 19 11:27:56 2016 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -798,6 +798,15 @@
.addBinaryOperator(BOOLEAN, BOOLEAN, BOOLEAN, bool_or));
}
+ Symbol lookupBinaryOp(Predicate<Symbol> applicabilityTest) {
+ return binaryOperators.values().stream()
+ .flatMap(List::stream)
+ .map(helper -> helper.doLookup(applicabilityTest))
+ .distinct()
+ .filter(sym -> sym != syms.noSymbol)
+ .findFirst().get();
+ }
+
/**
* Complete the initialization of an operator helper by storing it into the corresponding operator map.
*/