Skip to content

go/types, types2: audit type assertions for potential Alias bugs #67547

Closed
@findleyr

Description

@findleyr

#67540 fixes a bug where GODEBUG=gotypesalias=1 (the default in go 1.23) results in a type checker bug.

While reviewing the fix (https://go.dev/cl/587075), I noticed that right above that bug, there is another, allowing the following program to compile without error (the error comes from vet, not type checking, which may actually indicate another bug: is vet not honoring GODEBUG?):

https://go.dev/play/p/cy0Jma_6jAA?v=gotip

It appears that we need to more thoroughly audit type assertions within the type checker.

CC @griesemer @adonovan

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions