Open
Description
Issue Kind
Bad Diagnostic Produced
Source Code
protocol Test<Foo Bar> {}
Description
Produces the following diagnostics
1 │ protocol Test<Foo Bar> {}
│ ├─ error: expected '>' to end primary associated type clause
│ ╰─ error: unexpected code 'Bar>' in protocol
We should be consuming Bar
as an unexpected token when looking for the closing >
in the primary associated value clause. The tricky part is that none of our recovery infrastructure supports the recovery to a token prefix.
Came up in #1910 (comment)