summaryrefslogtreecommitdiff
path: root/test/interface2.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/interface2.go')
-rw-r--r--test/interface2.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/interface2.go b/test/interface2.go
new file mode 100644
index 000000000..8dfc9d8ff
--- /dev/null
+++ b/test/interface2.go
@@ -0,0 +1,23 @@
+// $G $D/$F.go && $L $F.$A && ! ./$A.out
+
+// Copyright 2009 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
+
+type S struct
+
+type I interface {
+ Foo()
+}
+
+func main() {
+ var s *S;
+ var i I;
+ i = s;
+}
+
+// hide S down here to avoid static warning
+type S struct {
+}