1
0
mirror of https://github.com/golang/go synced 2024-11-22 06:54:39 -07:00

Match gccgo error messages.

bug117.go:13:12: error: reference to undefined field or method

import1.go:9:2: error: redefinition of '.main.bufio'
import1.go:8:2: note: previous definition of '.main.bufio' was here
import1.go:9:2: error: incompatible imported type 'bufio.Error'

interface9.go:25:5: error: incompatible types in assignment (method P requires a pointer)
interface9.go:30:5: error: incompatible types in assignment (method P requires a pointer)

R=rsc
DELTA=5  (0 added, 0 deleted, 5 changed)
OCL=29044
CL=29055
This commit is contained in:
Ian Lance Taylor 2009-05-19 15:23:43 -07:00
parent d85238635a
commit bc5620c2e0
3 changed files with 5 additions and 5 deletions

View File

@ -15,7 +15,7 @@ func fn(p PS) int {
// p has type PS, and PS has no methods. // p has type PS, and PS has no methods.
// (a compiler might see that p is a pointer // (a compiler might see that p is a pointer
// and go looking in S without noticing PS.) // and go looking in S without noticing PS.)
return p.get() // ERROR "undefined DOT" return p.get() // ERROR "undefined"
} }
func main() { func main() {
s := S{1}; s := S{1};

View File

@ -9,6 +9,6 @@
package main package main
import ( import (
"bufio"; "bufio"; // GCCGO_ERROR "previous"
bufio "os"; // ERROR "redeclaration" bufio "os"; // ERROR "redeclaration|redefinition|incompatible"
) )

View File

@ -26,12 +26,12 @@ func main() {
var sp SP; var sp SP;
v = t; v = t;
p = t; // ERROR "is not" p = t; // ERROR "is not|requires a pointer"
v = &t; v = &t;
p = &t; p = &t;
v = s; v = s;
p = s; // ERROR "is not" p = s; // ERROR "is not|requires a pointer"
v = &s; v = &s;
p = &s; p = &s;