public Abstract.ClassField resolveClassField(Abstract.ClassDefinition classDefinition, String name, DynamicNamespaceProvider dynamicNsProvider, ErrorReporter errorReporter, Abstract.SourceNode cause) {
Abstract.Definition resolvedRef = dynamicNsProvider.forClass(classDefinition).resolveName(name);
if (resolvedRef instanceof Abstract.ClassField) {
return (Abstract.ClassField) resolvedRef;
} else {
<BUG>errorReporter.report(resolvedRef != null ? new WrongDefinition("Expected a class field", cause) : new NotInScopeError(cause, name));
</BUG>
return null;
}
}

public Abstract.ClassField resolveClassField(Abstract.ClassDefinition classDefinition, String name, DynamicNamespaceProvider dynamicNsProvider, ErrorReporter errorReporter, Abstract.SourceNode cause) {
Abstract.Definition resolvedRef = dynamicNsProvider.forClass(classDefinition).resolveName(name);
if (resolvedRef instanceof Abstract.ClassField) {
return (Abstract.ClassField) resolvedRef;
} else {
errorReporter.report(resolvedRef != null ? new WrongDefinition("Expected a class field", resolvedRef, cause) : new NotInScopeError(cause, name));
return null;
}
}
