54 */ |
54 */ |
55 boolean selectSuper = false; |
55 boolean selectSuper = false; |
56 |
56 |
57 /** Are arguments to current function applications boxed into an array for varargs? |
57 /** Are arguments to current function applications boxed into an array for varargs? |
58 */ |
58 */ |
59 boolean varArgs = false; |
59 Resolve.MethodResolutionPhase pendingResolutionPhase = null; |
60 |
60 |
61 /** A record of the lint/SuppressWarnings currently in effect |
61 /** A record of the lint/SuppressWarnings currently in effect |
62 */ |
62 */ |
63 Lint lint; |
63 Lint lint; |
64 |
64 |
65 /** The variable whose initializer is being attributed |
65 /** The variable whose initializer is being attributed |
66 * useful for detecting self-references in variable initializers |
66 * useful for detecting self-references in variable initializers |
67 */ |
67 */ |
68 Symbol enclVar = null; |
68 Symbol enclVar = null; |
69 |
69 |
|
70 /** ResultInfo to be used for attributing 'return' statement expressions |
|
71 * (set by Attr.visitMethod and Attr.visitLambda) |
|
72 */ |
|
73 Attr.ResultInfo returnResult = null; |
|
74 |
70 /** Duplicate this context, replacing scope field and copying all others. |
75 /** Duplicate this context, replacing scope field and copying all others. |
71 */ |
76 */ |
72 AttrContext dup(Scope scope) { |
77 AttrContext dup(Scope scope) { |
73 AttrContext info = new AttrContext(); |
78 AttrContext info = new AttrContext(); |
74 info.scope = scope; |
79 info.scope = scope; |
75 info.staticLevel = staticLevel; |
80 info.staticLevel = staticLevel; |
76 info.isSelfCall = isSelfCall; |
81 info.isSelfCall = isSelfCall; |
77 info.selectSuper = selectSuper; |
82 info.selectSuper = selectSuper; |
78 info.varArgs = varArgs; |
83 info.pendingResolutionPhase = pendingResolutionPhase; |
79 info.lint = lint; |
84 info.lint = lint; |
80 info.enclVar = enclVar; |
85 info.enclVar = enclVar; |
|
86 info.returnResult = returnResult; |
81 return info; |
87 return info; |
82 } |
88 } |
83 |
89 |
84 /** Duplicate this context, copying all fields. |
90 /** Duplicate this context, copying all fields. |
85 */ |
91 */ |