Lines 4891-4897
Link Here
|
4891 |
*/ |
4891 |
*/ |
4892 |
private Type dummyMethodType(JCMethodDecl md) { |
4892 |
private Type dummyMethodType(JCMethodDecl md) { |
4893 |
Type restype = syms.unknownType; |
4893 |
Type restype = syms.unknownType; |
4894 |
if (md != null && md.restype.hasTag(TYPEIDENT)) { |
4894 |
if (md != null && md.restype != null && md.restype.hasTag(TYPEIDENT)) { |
4895 |
JCPrimitiveTypeTree prim = (JCPrimitiveTypeTree)md.restype; |
4895 |
JCPrimitiveTypeTree prim = (JCPrimitiveTypeTree)md.restype; |
4896 |
if (prim.typetag == VOID) |
4896 |
if (prim.typetag == VOID) |
4897 |
restype = syms.voidType; |
4897 |
restype = syms.voidType; |
Lines 4935-4940
Link Here
|
4935 |
} |
4935 |
} |
4936 |
super.visitClassDef(that); |
4936 |
super.visitClassDef(that); |
4937 |
} |
4937 |
} |
|
|
4938 |
|
4939 |
private boolean inMethodHeader; |
4938 |
|
4940 |
|
4939 |
@Override |
4941 |
@Override |
4940 |
public void visitMethodDef(JCMethodDecl that) { |
4942 |
public void visitMethodDef(JCMethodDecl that) { |
Lines 4942-4947
Link Here
|
4942 |
if (that.sym == null) { |
4944 |
if (that.sym == null) { |
4943 |
that.sym = new MethodSymbol(0, that.name, that.type, syms.noSymbol); |
4945 |
that.sym = new MethodSymbol(0, that.name, that.type, syms.noSymbol); |
4944 |
} |
4946 |
} |
|
|
4947 |
scan(that.mods); |
4948 |
scan(that.restype); |
4949 |
scan(that.typarams); |
4950 |
try { |
4951 |
inMethodHeader = true; |
4952 |
scan(that.recvparam); |
4953 |
scan(that.params); |
4954 |
} finally { |
4955 |
inMethodHeader = false; |
4956 |
} |
4957 |
scan(that.thrown); |
4958 |
scan(that.defaultValue); |
4959 |
scan(that.body); |
4945 |
super.visitMethodDef(that); |
4960 |
super.visitMethodDef(that); |
4946 |
} |
4961 |
} |
4947 |
|
4962 |
|
Lines 4949-4955
Link Here
|
4949 |
public void visitVarDef(JCVariableDecl that) { |
4964 |
public void visitVarDef(JCVariableDecl that) { |
4950 |
initTypeIfNeeded(that); |
4965 |
initTypeIfNeeded(that); |
4951 |
if (that.sym == null) { |
4966 |
if (that.sym == null) { |
4952 |
that.sym = new VarSymbol(0, that.name, that.type, syms.noSymbol); |
4967 |
that.sym = new VarSymbol(inMethodHeader ? PARAMETER : 0, that.name, that.type, syms.noSymbol); |
4953 |
that.sym.adr = 0; |
4968 |
that.sym.adr = 0; |
4954 |
} |
4969 |
} |
4955 |
super.visitVarDef(that); |
4970 |
super.visitVarDef(that); |