C#: Remove duplicated pattern extraction logic

This commit is contained in:
Tamas Vajk
2020-11-12 14:34:54 +01:00
parent 3f150bb09b
commit dee1690748
2 changed files with 3 additions and 45 deletions

View File

@@ -50,6 +50,8 @@ namespace Semmle.Extraction.CSharp.Entities.Expressions
}
throw new InternalError(varPattern, "Unable to get the declared symbol of the var pattern designation.");
case DiscardDesignationSyntax discard:
return new Expressions.Discard(cx, discard, parent, child);
default:
throw new InternalError("var pattern designation is unhandled");
}