]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix generic type handling in crawler
authorDan Scales <danscales@google.com>
Tue, 14 Sep 2021 01:50:19 +0000 (18:50 -0700)
committerDan Scales <danscales@google.com>
Fri, 17 Sep 2021 19:50:04 +0000 (19:50 +0000)
commitcea7a71d40115333d5943162e5764162b767389d
tree56060d677326dab6886fc253407af1c95c9bf02f
parent74e384f50d3071c97effa3afd43ec29111587d59
cmd/compile: fix generic type handling in crawler

There are a bunch of nodes beside ONAME and OTYPE, (such as OSTRUCTLIT
and OCOMPLIT) which can introduce a generic type that we need to mark.
So, just mark any generic type on any node in markInlBody. In this
particular issue, the type is introduced by an OSTRUCTLIT node.

Updates #48337

Change-Id: I271932518f0c1fb54d91a603e01a855c69df631d
Reviewed-on: https://go-review.googlesource.com/c/go/+/349909
Trust: Dan Scales <danscales@google.com>
Trust: Carlos Amedee <carlos@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/typecheck/crawler.go
test/typeparam/issue48337a.dir/a.go [new file with mode: 0644]
test/typeparam/issue48337a.dir/main.go [new file with mode: 0644]
test/typeparam/issue48337a.go [new file with mode: 0644]
test/typeparam/issue48337a.out [new file with mode: 0644]