diff options
author | Dan Scales <danscales@google.com> | 2021-09-13 18:50:19 -0700 |
---|---|---|
committer | Dan Scales <danscales@google.com> | 2021-09-17 19:50:04 +0000 |
commit | cea7a71d40115333d5943162e5764162b767389d (patch) | |
tree | 56060d677326dab6886fc253407af1c95c9bf02f /test/typeparam/issue48337a.dir/main.go | |
parent | 74e384f50d3071c97effa3afd43ec29111587d59 (diff) | |
download | go-cea7a71d40115333d5943162e5764162b767389d.tar.gz go-cea7a71d40115333d5943162e5764162b767389d.zip |
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>
Diffstat (limited to 'test/typeparam/issue48337a.dir/main.go')
-rw-r--r-- | test/typeparam/issue48337a.dir/main.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/typeparam/issue48337a.dir/main.go b/test/typeparam/issue48337a.dir/main.go new file mode 100644 index 0000000000..16f71153f3 --- /dev/null +++ b/test/typeparam/issue48337a.dir/main.go @@ -0,0 +1,12 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import "a" + +func main() { + obj := a.NewWrapperWithLock("this file does import sync") + obj.PrintWithLock() +} |