Skip to content

Commit 8c9e5af

Browse files
author
duke
committedDec 7, 2021
Automatic merge of jdk:master into master
2 parents 06a2582 + 3c2951f commit 8c9e5af

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed
 

‎make/langtools/tools/compileproperties/CompileProperties.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ private boolean parseOptions(String args[]) {
183183
log.error("cannot close " + filename, e);
184184
}
185185
}
186-
if ( ok = true && contents != null ) {
186+
ok = true;
187+
if ( contents != null ) {
187188
String tokens[] = (new String(contents)).split("\\s+");
188189
if ( tokens.length > 0 ) {
189190
ok = parseOptions(tokens);

‎src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -1301,7 +1301,7 @@ class MostSpecificFunctionReturnChecker extends DeferredAttr.PolyScanner {
13011301

13021302
@Override
13031303
void skip(JCTree tree) {
1304-
result &= false;
1304+
result = false;
13051305
}
13061306

13071307
@Override
@@ -1313,9 +1313,9 @@ public void visitConditional(JCConditional tree) {
13131313
@Override
13141314
public void visitReference(JCMemberReference tree) {
13151315
if (sRet.hasTag(VOID)) {
1316-
result &= true;
1316+
// do nothing
13171317
} else if (tRet.hasTag(VOID)) {
1318-
result &= false;
1318+
result = false;
13191319
} else if (tRet.isPrimitive() != sRet.isPrimitive()) {
13201320
boolean retValIsPrimitive =
13211321
tree.refPolyKind == PolyKind.STANDALONE &&
@@ -1335,9 +1335,9 @@ public void visitParens(JCParens tree) {
13351335
@Override
13361336
public void visitLambda(JCLambda tree) {
13371337
if (sRet.hasTag(VOID)) {
1338-
result &= true;
1338+
// do nothing
13391339
} else if (tRet.hasTag(VOID)) {
1340-
result &= false;
1340+
result = false;
13411341
} else {
13421342
List<JCExpression> lambdaResults = lambdaResults(tree);
13431343
if (!lambdaResults.isEmpty() && unrelatedFunctionalInterfaces(tRet, sRet)) {

0 commit comments

Comments
 (0)
Please sign in to comment.