Closed
Description
Issue Kind
Bad Diagnostic Produced
Source Code
// Can be parsed and produces no diagnostics.
func f< >() {}
// Can be parsed. Printing the node or asking for the diagnostics leads to a crash.
func f<>() {}
Description
In both examples, the "old" parser reports "Expected an identifier to name generic parameter" on >
which is helpful, but not the real issue.
Best would be a message like "Generic parameter clause cannot be empty" or similar. It should be reported in both examples. The ParseDiagnosticsGenerator
should not crash in the second example.