Commit 958927c8 authored by Rob Findley's avatar Rob Findley Committed by Robert Findley
Browse files

[dev.typeparams] go/parser: error for type instances without ParseTypeParams

It should be an invariant that the parser does not produce ast.CallExprs
with Brackets == true unless parsing with ParseTypeParams.

Fix the one case where this invariant was violated, and add a test for
errors produced in valid generic code when ParseTypeParams is unset. We
did have some coverage of errors in short_test.go, but I find them to be
easier to read in a testdata file and would like to gradually migrate
them there.

Change-Id: If2d174377087daa1b820cabc2b5bf8bcb0b39d8e
Reviewed-on: https://go-review.googlesource.com/c/go/+/284192


Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
Trust: Robert Griesemer <gri@golang.org>
Trust: Robert Findley <rfindley@google.com>
parent 90bfc730
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment