aboutsummaryrefslogtreecommitdiff
path: root/test/typeparam/importtest.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2020-11-10 13:28:17 -0800
committerRobert Griesemer <gri@golang.org>2020-11-11 01:11:43 +0000
commit6877ee1e07d82896becc2f624ef314613d3df4a0 (patch)
tree3a80f0d7eac24a23b2c6da23f82d94f7f3b7804e /test/typeparam/importtest.go
parent165ceb09f95fdcf76ebf894908b9a170d7b7524b (diff)
downloadgo-6877ee1e07d82896becc2f624ef314613d3df4a0.tar.gz
go-6877ee1e07d82896becc2f624ef314613d3df4a0.zip
[dev.typeparams] cmd/compile: use existing findpkg algorithm when importing through types2
Change-Id: I9044de7829d22addb5bc570401508082e3f007eb Reviewed-on: https://go-review.googlesource.com/c/go/+/269057 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'test/typeparam/importtest.go')
-rw-r--r--test/typeparam/importtest.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/typeparam/importtest.go b/test/typeparam/importtest.go
new file mode 100644
index 0000000000..9cb30e8a7c
--- /dev/null
+++ b/test/typeparam/importtest.go
@@ -0,0 +1,16 @@
+// compile -G
+
+// Copyright 2020 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.
+
+// This file checks that basic importing works in -G mode.
+
+package p
+
+import "fmt"
+import "math"
+
+func f(x float64) {
+ fmt.Println(math.Sin(x))
+}