src/share/classes/com/sun/tools/javac/code/Type.java
Print this page
*** 788,798 ****
public MethodType(List<Type> argtypes,
Type restype,
List<Type> thrown,
TypeSymbol methodClass) {
! super(METHOD, methodClass);
this.argtypes = argtypes;
this.restype = restype;
this.thrown = thrown;
}
--- 788,806 ----
public MethodType(List<Type> argtypes,
Type restype,
List<Type> thrown,
TypeSymbol methodClass) {
! this(METHOD, argtypes, restype, thrown, methodClass);
! }
!
! public MethodType(int tag, // METHOD or FUNCTION
! List<Type> argtypes,
! Type restype,
! List<Type> thrown,
! TypeSymbol methodClass) {
! super(tag, methodClass);
this.argtypes = argtypes;
this.restype = restype;
this.thrown = thrown;
}
*** 857,867 ****
Type restype1 = f.apply(restype);
List<Type> thrown1 = map(thrown, f);
if (argtypes1 == argtypes &&
restype1 == restype &&
thrown1 == thrown) return this;
! else return new MethodType(argtypes1, restype1, thrown1, tsym);
}
public boolean contains(Type elem) {
return elem == this || contains(argtypes, elem) || restype.contains(elem);
}
--- 865,875 ----
Type restype1 = f.apply(restype);
List<Type> thrown1 = map(thrown, f);
if (argtypes1 == argtypes &&
restype1 == restype &&
thrown1 == thrown) return this;
! else return new MethodType(tag, argtypes1, restype1, thrown1, tsym);
}
public boolean contains(Type elem) {
return elem == this || contains(argtypes, elem) || restype.contains(elem);
}