]> Cypherpunks repositories - gostls13.git/commitdiff
add a bug: method call doesn't compile
authorRob Pike <r@golang.org>
Wed, 18 Jun 2008 18:51:21 +0000 (11:51 -0700)
committerRob Pike <r@golang.org>
Wed, 18 Jun 2008 18:51:21 +0000 (11:51 -0700)
SVN=123403

test/bugs/bug048.go
test/bugs/bug054.go [new file with mode: 0644]
test/golden.out

index 0dfbaae9ad9eddf292a648467eac856a29bf7d4d..519d7bc7b2b1330d62b3deed8369070185472699 100644 (file)
@@ -9,5 +9,5 @@ package main
 func main() {
        type M map[int] int;
        m0 := M(7 , 8); // parses OK
-       m1 := M(7 : 8); // BUG: syntax error
+       m1 := M(7 : 8); // BUG: syntax error  (grammar but not doc has [a:b]; what should we do?
 }
diff --git a/test/bugs/bug054.go b/test/bugs/bug054.go
new file mode 100644 (file)
index 0000000..bfd09ec
--- /dev/null
@@ -0,0 +1,27 @@
+// $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 Element interface {
+}
+
+type Vector struct {
+       elem *[]Element;
+}
+
+func (v *Vector) At(i int) Element {
+       return v.elem[i];
+}
+
+type TStruct struct {
+       name string;
+       fields *Vector;
+}
+
+func (s *TStruct) field() {
+       t := s.fields.At(0);
+}
index 13fb1d4ed51073c4ed8fbeda1ba582387ff5a89c..b5445af501ef7f22ee1aa016b6242e290a224b29 100644 (file)
@@ -26,7 +26,7 @@ hello, world
 =========== ./literal.go
 
 =========== ./nil.go
-nil.go:30: fatal error: naddr: const <T>{<i><int32>INT32;}
+nil.go:30: illegal conversion of constant to <T>{}
 BUG: known to fail incorrectly
 
 =========== ./sieve.go
@@ -142,8 +142,6 @@ bugs/bug022.go:8: illegal types for operand: INDEXPTR
 BUG: known to fail incorrectly
 
 =========== bugs/bug023.go
-bugs/bug023.go:20: fatal error: naddr: const <Type>I{<TypeName>101({},{}){};}
-BUG: known to fail incorrectly
 
 =========== bugs/bug025.go
 bugs/bug025.go:7: fatal error: dumpexportvar: oname nil: Foo
@@ -217,7 +215,7 @@ bugs/bug044.go:23: error in shape across assignment
 BUG: compilation should succeed
 
 =========== bugs/bug045.go
-bugs/bug045.go:13: fatal error: naddr: const <T>{<i><int32>INT32;}
+bugs/bug045.go:13: illegal conversion of constant to <T>{}
 BUG: known to fail incorrectly
 
 =========== bugs/bug046.go
@@ -242,8 +240,6 @@ bugs/bug048.go:8: syntax error
 BUG: known to fail incorrectly
 
 =========== bugs/bug049.go
-bugs/bug049.go:6: fatal error: stringpool: not string
-BUG: fatal error
 
 =========== bugs/bug050.go
 bugs/bug050.go:3: package statement must be first
@@ -271,6 +267,8 @@ BUG: incorrect code for division
 bugs/bug053.go:6: syntax error
 BUG: len should not be a keyword
 
+=========== bugs/bug054.go
+
 =========== fixedbugs/bug000.go
 
 =========== fixedbugs/bug001.go