Skip to content

Commit 32c29f2

Browse files
robstrykermickaelistria
authored andcommitted
Fix test0308
Signed-off-by: Rob Stryker <[email protected]>
1 parent b0b3248 commit 32c29f2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacBindingResolver.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,11 @@ IMethodBinding resolveMethod(MethodDeclaration method) {
10211021
if (!this.isRecoveringBindings) {
10221022
if( methodDecl.type == null || methodDecl.type instanceof ErrorType)
10231023
return null;
1024+
if( methodDecl.restype == null || methodDecl.restype.type instanceof ErrorType) {
1025+
boolean methodDeclNameMatchesInit = Objects.equals(methodDecl.name.toString(), Names.instance(this.context).init.toString());
1026+
if( !methodDeclNameMatchesInit )
1027+
return null;
1028+
}
10241029
if( methodDecl.params != null ) {
10251030
for( JCVariableDecl jcvd : methodDecl.params) {
10261031
if( jcvd.type instanceof ErrorType ) {

0 commit comments

Comments
 (0)