--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrContext.java Thu Oct 17 20:27:44 2019 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrContext.java Thu Oct 17 20:53:35 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2019, 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
@@ -29,6 +29,7 @@
import com.sun.tools.javac.util.*;
import com.sun.tools.javac.code.*;
import com.sun.tools.javac.code.Scope.WriteableScope;
+import com.sun.tools.javac.comp.DeferredAttr.AttributionMode;
/** Contains information specific to the attribute and enter
* passes, to be used in place of the generic field in environments.
@@ -67,7 +68,7 @@
/** Is this a speculative attribution environment?
*/
- boolean isSpeculative = false;
+ AttributionMode attributionMode = AttributionMode.FULL;
/**
* Is this an attribution environment for an anonymous class instantiated using <> ?
@@ -101,10 +102,10 @@
*/
Attr.ResultInfo returnResult = null;
- /** ResultInfo to be used for attributing 'break' statement expressions
+ /** ResultInfo to be used for attributing 'yield' statement expressions
* (set by Attr.visitSwitchExpression)
*/
- Attr.ResultInfo breakResult = null;
+ Attr.ResultInfo yieldResult = null;
/** Symbol corresponding to the site of a qualified default super call
*/
@@ -129,11 +130,11 @@
info.lint = lint;
info.enclVar = enclVar;
info.returnResult = returnResult;
- info.breakResult = breakResult;
+ info.yieldResult = yieldResult;
info.defaultSuperCallSite = defaultSuperCallSite;
info.isSerializable = isSerializable;
info.isLambda = isLambda;
- info.isSpeculative = isSpeculative;
+ info.attributionMode = attributionMode;
info.isAnonymousDiamond = isAnonymousDiamond;
info.isNewClass = isNewClass;
info.preferredTreeForDiagnostics = preferredTreeForDiagnostics;