when assigning a multifield object
(structs or arrays of structs) they
must not contain any fields that could
not be assigned individually.
R=ken
OCL=29192
CL=29194
this is not a user-visible change.
before, all interface values were
struct Itype {
Sigt *type;
Sigi *inter;
void *method[n];
}
struct Iface {
void *addr;
Itype *itype;
}
the itype is basically a vtable, but it's unnecessary
if the static type is interface{ }.
for interface values with static type empty, the
new representation is
struct Eface {
void *addr;
Sigt *type;
}
this complicates the code somewhat, but
it reduces the number of Itypes that
have to be computed and cached,
it opens up opportunities to avoid function
calls in a few common cases,
and it will make it possible to lay out
interface{} values at compile time,
which i think i'll need for the new reflection.
R=ken
OCL=28701
CL=29121
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
gives an type mismatch error, although both values appear to
have the same type.
R=ken,rsc
DELTA=23 (23 added, 0 deleted, 0 changed)
OCL=28786
CL=28805
if both types are named, they must be
the same type (arising from the same
declaration).
R=r,gri
DELTA=44 (21 added, 4 deleted, 19 changed)
OCL=28436
CL=28577
replace "shape error across CALL" with more information.
x.go:7: not enough arguments to CALL
a int, b int
int
x.go:10: assignment count mismatch: 3 = 2
x.go:12: too many arguments to RETURN
[no arguments expected]
int, int, int
also leave type alone after conversion failure,
for later errors:
bug049.go:6: cannot convert nil constant to string
bug049.go:6: illegal types for operand: EQ
string
nil # this used to be blank
R=ken
OCL=28405
CL=28407
you should be able to convert a pointer to an array to a
slice, you should not be able to convert an array to a slice.
Currently 6g works the other way around.
R=ken,rsc
DELTA=17 (17 added, 0 deleted, 0 changed)
OCL=28033
CL=28067
declbad.go:15:3: error: variables redeclared but no variable is new
declbad.go:20:3: error: redefinition of 'f'
declbad.go:19:3: note: previous definition of 'f' was here
declbad.go:25:3: error: redefinition of 'i'
declbad.go:24:3: note: previous definition of 'i' was here
declbad.go:30:3: error: variables redeclared but no variable is new
declbad.go:35:3: error: redefinition of 'i'
declbad.go:34:3: note: previous definition of 'i' was here
declbad.go:40:3: error: variables redeclared but no variable is new
declbad.go:45:3: error: variables redeclared but no variable is new
R=r
DELTA=10 (0 added, 0 deleted, 10 changed)
OCL=27934
CL=27957