x/tools/go/ssa: make opaqueType less annoying to use #19670
The ssa package defines an opaqueType, which is an "opaque and degenerate" type, currently used by the Range instruction. It truly is degenerate, embedding a nil types.Type, causing a call to types.Type.Underlying to panic.
Code that wants to operate on the types of instructions needs to specifically check for the Range instruction and skip it. There doesn't seem to be a way to check for this degenerate type specifically, which would at least permit passing types around without having to keep track of the originating instruction.
The simplest solution that I can think of is to implement Underlying as the identity function. However I suspect that this hasn't been done for a good reason?
The text was updated successfully, but these errors were encountered:
New tasks include: golang/go#19675 cmd/vet: report uses of -0 in float32/64 context golang/go#19683 cmd/compile: eliminate usages of global lineno golang/go#19670 x/tools/go/ssa: make opaqueType less annoying to use golang/go#19636 encoding/base64: decoding is slow golang/go#23471 x/perf/cmd/benchstat: tips or quickstart for newcomers golang/go#19577 test: errorcheck support for intraline errors golang/go#19490 cmd/vet: reduce the amount of false positives for -shadow mode golang/go#19042 cmd/internal/obj: optimize wrapper method prologue for branch prediction golang/go#19013 cmd/compile: add tool for understanding/debugging SSA rules