DeclarationErrors instead of SyntaxErrors in Resolver