revert some type changes that are no longer needed

This commit is contained in:
Erik Krogh Kristensen
2021-09-10 23:28:41 +02:00
parent 48b763c7e9
commit cc0d86403e
2 changed files with 2 additions and 2 deletions

View File

@@ -3219,7 +3219,7 @@ public class Parser {
Expression superClass = this.parseClassSuper();
Position bodyStartLoc = this.startLoc;
boolean hadConstructor = false;
List<MemberDefinition<?>> body = new ArrayList<>();
List<MemberDefinition<?>> body = new ArrayList<MemberDefinition<?>>();
this.expect(TokenType.braceL);
while (!this.eat(TokenType.braceR)) {
if (this.eat(TokenType.semi)) continue;

View File

@@ -20,7 +20,7 @@ public class ClassBody extends Node {
}
public MethodDefinition getConstructor() {
for (Node md : body) if (md instanceof MethodDefinition && ((MethodDefinition)md).isConstructor()) return (MethodDefinition) md;
for (MemberDefinition<?> md : body) if (md.isConstructor()) return (MethodDefinition) md;
return null;
}