src/share/classes/com/sun/tools/javac/comp/AttrContext.java

changeset 3005
0353cf89ea96
parent 2390
b06c2db45ddb
child 3295
859dc787b52b
equal deleted inserted replaced
3004:049e909914f1 3005:0353cf89ea96
23 * questions. 23 * questions.
24 */ 24 */
25 25
26 package com.sun.tools.javac.comp; 26 package com.sun.tools.javac.comp;
27 27
28 import com.sun.tools.javac.tree.JCTree;
28 import com.sun.tools.javac.util.*; 29 import com.sun.tools.javac.util.*;
29 import com.sun.tools.javac.code.*; 30 import com.sun.tools.javac.code.*;
30 31
31 /** Contains information specific to the attribute and enter 32 /** Contains information specific to the attribute and enter
32 * passes, to be used in place of the generic field in environments. 33 * passes, to be used in place of the generic field in environments.
78 79
79 /** Symbol corresponding to the site of a qualified default super call 80 /** Symbol corresponding to the site of a qualified default super call
80 */ 81 */
81 Type defaultSuperCallSite = null; 82 Type defaultSuperCallSite = null;
82 83
84 /** Tree that when non null, is to be preferentially used in diagnostics.
85 * Usually Env<AttrContext>.tree is the tree to be referred to in messages,
86 * but this may not be true during the window a method is looked up in enclosing
87 * contexts (JDK-8145466)
88 */
89 JCTree preferredTreeForDiagnostics;
90
83 /** Duplicate this context, replacing scope field and copying all others. 91 /** Duplicate this context, replacing scope field and copying all others.
84 */ 92 */
85 AttrContext dup(Scope scope) { 93 AttrContext dup(Scope scope) {
86 AttrContext info = new AttrContext(); 94 AttrContext info = new AttrContext();
87 info.scope = scope; 95 info.scope = scope;
92 info.lint = lint; 100 info.lint = lint;
93 info.enclVar = enclVar; 101 info.enclVar = enclVar;
94 info.returnResult = returnResult; 102 info.returnResult = returnResult;
95 info.defaultSuperCallSite = defaultSuperCallSite; 103 info.defaultSuperCallSite = defaultSuperCallSite;
96 info.isSerializable = isSerializable; 104 info.isSerializable = isSerializable;
105 info.preferredTreeForDiagnostics = preferredTreeForDiagnostics;
97 return info; 106 return info;
98 } 107 }
99 108
100 /** Duplicate this context, copying all fields. 109 /** Duplicate this context, copying all fields.
101 */ 110 */

mercurial