From 2716505a7770df9c89f76d94e6bd1ab8c163c031 Mon Sep 17 00:00:00 2001 From: Dave Holoway Date: Sun, 28 Jun 2020 23:30:16 +0100 Subject: [PATCH] ignore unnamed type declarations --- langserver/java/body-parser3.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/langserver/java/body-parser3.js b/langserver/java/body-parser3.js index 527de5d..bf2687d 100644 --- a/langserver/java/body-parser3.js +++ b/langserver/java/body-parser3.js @@ -502,6 +502,9 @@ function sourceType(docs, modifiers, tokens, scope_or_pkgname, typeKind, owner, scope = scope_or_pkgname; } const type = typeDeclaration(package_name, scope, docs, modifiers, typeKind, tokens.current, tokens, imports, typemap); + if (!type) { + return; + } owner.types.push(type); if (!(owner instanceof MethodDeclarations)) { typemap.set(type.shortSignature, type);