go/test/gen
Ian Lance Taylor 39dc66f9c2 go/types: improve contract error messages
If a type or type parameter does not satisfy a contract because the
type or type constraint is not found in the list of type constraints,
change
    T does not satisfy C(T) (T type constraint int not found in interface{type ...})
to
    T does not satisfy C(T) (T type constraint int not found in [type ...])
Also, before this change, if the contract had any required methods,
those were also listed; now we just list the type constraints.

If a defined type does not satisfy a contract because the underlying
type is not found in the list of type constraints, change
    MyUint does not satisfy C(T) (MyUint not found in interface{type ...})
to
    MyUint does not satisfy C(T) (uint not found in [type ...])
That is, when describing the type that is not found, use the underlying type,
not the defined type.

Change-Id: I345836c44921e2e13e7f02041839b5eb4df75c45
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go2-dev/+/718718
Reviewed-by: Robert Griesemer <gri@google.com>
2020-06-13 12:24:49 -07:00
..
err002.dir test: drop a 0 from gen/err000n.go2 2020-06-13 12:24:49 -07:00
g005.dir go/go2go, cmd/go2go: support importing Go2 packages 2020-06-13 12:24:45 -07:00
err001.go2 go/types: improve contract error messages 2020-06-13 12:24:49 -07:00
err002.go2 test: drop a 0 from gen/err000n.go2 2020-06-13 12:24:49 -07:00
g001.go2
g001.out
g002.go2
g002.out
g003.go2 go/go2go: support parameterized types 2020-06-13 12:24:44 -07:00
g004.go2 go/go2go: add support for methods of parameterized types 2020-06-13 12:24:44 -07:00
g005.go2 go/go2go, cmd/go2go: support importing Go2 packages 2020-06-13 12:24:45 -07:00
g006.go2 go/go2go: support type inference 2020-06-13 12:24:46 -07:00
g007.go2 go/go2go: record types of instantiated AST types 2020-06-13 12:24:49 -07:00