Commit Graph

260 Commits

Author SHA1 Message Date
Rob Pike
acaba18bba bug163: ideographs are not letters
also update golden.out from bug162

R=rsc
DELTA=16  (16 added, 0 deleted, 0 changed)
OCL=30298
CL=30324
2009-06-15 21:13:28 -07:00
Russ Cox
3751b259cb bug140 is fixed
R=ken
OCL=29989
CL=29999
2009-06-06 19:28:01 -07:00
Russ Cox
0d2c63a0b9 update golden.out with new compiler errors
R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=29986
CL=29988
2009-06-06 17:01:14 -07:00
Russ Cox
70ce47058e bug in parallel assignment
R=r
DELTA=40  (40 added, 0 deleted, 0 changed)
OCL=29850
CL=29855
2009-06-03 17:26:53 -07:00
Ken Thompson
c17ce9f94f prevent multiple similar errors
in complex literals. side effect is
fix of error in initializerr.go

R=r
OCL=29667
CL=29667
2009-05-31 13:02:24 -07:00
Ian Lance Taylor
8cbb5d03bf Adjust expected errors to work with gccgo.
The change to assign.go is because the gcc testsuite fails to
handle .* in a normal way: it matches against the entire
compiler output, not just a single line.

assign.go:15:6: error: incompatible types in assignment (implicit assignment of 'sync.Mutex' hidden field 'key')
assign.go:19:6: error: incompatible types in assignment (implicit assignment of 'sync.Mutex' hidden field 'key')
assign.go:23:6: error: incompatible types in assignment (implicit assignment of 'sync.Mutex' hidden field 'key')
assign.go:27:6: error: incompatible types in assignment (implicit assignment of 'sync.Mutex' hidden field 'key')

chan/perm.go:14:5: error: incompatible types in assignment
chan/perm.go:15:5: error: incompatible types in assignment
chan/perm.go:16:6: error: incompatible types in assignment
chan/perm.go:17:6: error: incompatible types in assignment
chan/perm.go:24:7: error: invalid send on receive-only channel
chan/perm.go:25:12: error: invalid send on receive-only channel
chan/perm.go:31:4: error: invalid receive on send-only channel
chan/perm.go:32:9: error: invalid receive on send-only channel
chan/perm.go:38:2: error: invalid send on receive-only channel
chan/perm.go:42:2: error: invalid receive on send-only channel

initializerr.go:14:17: error: reference to undefined variable 'X'
initializerr.go:14:19: error: mixture of field and value initializers
initializerr.go:15:26: error: duplicate value for field 'Y'
initializerr.go:16:10: error: too many values in struct composite literal
initializerr.go:18:19: error: index expression is not integer constant
initializerr.go:17:11: error: too many elements in composite literal

R=rsc
DELTA=12  (0 added, 0 deleted, 12 changed)
OCL=29657
CL=29665
2009-05-31 11:18:52 -07:00
Russ Cox
d6a9817051 bug157
R=ken
OCL=29651
CL=29653
2009-05-30 21:18:15 -07:00
Ken Thompson
be63b6dc44 bug 158
R=r
OCL=29646
CL=29646
2009-05-30 17:06:51 -07:00
Robert Griesemer
705f9af38e Replacement for abandoned CL 29626:
bug157 and bug158

R=rsc
DELTA=59  (59 added, 0 deleted, 0 changed)
OCL=29632
CL=29634
2009-05-29 16:43:24 -07:00
Ken Thompson
fbcbcdbb1d bug 156
R=r
OCL=29623
CL=29623
2009-05-29 15:34:47 -07:00
Ken Thompson
1c7bee0567 bug 155
R=r
OCL=29619
CL=29619
2009-05-29 14:42:24 -07:00
Russ Cox
cc7c31baa4 64-bit integer math bugs
R=r
DELTA=46  (46 added, 0 deleted, 0 changed)
OCL=29569
CL=29614
2009-05-29 13:46:43 -07:00
Ken Thompson
3b37b02834 bug 149
R=r
OCL=29612
CL=29612
2009-05-29 13:44:30 -07:00
Ken Thompson
b3f303ec9a bug 153
R=r
OCL=29479
CL=29479
2009-05-27 18:37:02 -07:00
Russ Cox
18890eebbf fix bug154; tweak bug153 exit status
R=ken
OCL=29448
CL=29448
2009-05-27 10:16:13 -07:00
Robert Griesemer
fec0c01e7f floating point bug
R=rsc
DELTA=35  (35 added, 0 deleted, 0 changed)
OCL=29442
CL=29444
2009-05-27 09:57:44 -07:00
Robert Griesemer
c376d5d7fc bad error message
TBR=rsc
DELTA=14  (14 added, 0 deleted, 0 changed)
OCL=29441
CL=29441
2009-05-27 09:47:13 -07:00
Ken Thompson
646927e48a and the golden file
R=r
OCL=29421
CL=29421
2009-05-26 19:58:59 -07:00
Rob Pike
70d711dfb8 bug150 is fixed
R=ken
OCL=29407
CL=29407
2009-05-26 16:06:03 -07:00
Russ Cox
c2fa45b973 allow type name as key to accomodate anonymous fields.
update tests.

R=ken
OCL=29207
CL=29207
2009-05-21 16:31:10 -07:00
Russ Cox
b9159722dd add test for yesterday's interface rule change (interface/convert1.go).
move interface tests to subdirectory.

R=r
DELTA=1632  (827 added, 804 deleted, 1 changed)
OCL=29181
CL=29191
2009-05-21 13:46:20 -07:00
Russ Cox
2da5022bcf change representation of interface values.
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
2009-05-20 14:57:55 -07:00
Russ Cox
a2ea790b1b bug152: literal []slice{ } as range expression
R=ken
OCL=28918
CL=28918
2009-05-15 13:17:07 -07:00
Ian Lance Taylor
025506d0a3 A comparison of two values with a type equivalent to string
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
2009-05-14 06:25:40 -07:00
Russ Cox
7cf30cd49e bug150
R=ken
OCL=28785
CL=28785
2009-05-13 18:05:27 -07:00
Russ Cox
917aa35f8f implications of stricter type equality:
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
2009-05-08 15:40:14 -07:00
Robert Griesemer
b3b3e0da94 conversion bug
R=r
DELTA=24  (24 added, 0 deleted, 0 changed)
OCL=28451
CL=28508
2009-05-08 09:58:25 -07:00
Russ Cox
b5e212ffdd 6g: error messages
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
2009-05-07 10:29:35 -07:00
Robert Griesemer
cc35ca529b wrong type used for dynamic type test
R=r
DELTA=40  (40 added, 0 deleted, 0 changed)
OCL=28308
CL=28311
2009-05-05 17:05:58 -07:00
Russ Cox
b8dd218e2e bug117 is fixed in 6g; now an errchk
R=r
DELTA=42  (20 added, 22 deleted, 0 changed)
OCL=28295
CL=28295
2009-05-05 13:41:46 -07:00
Russ Cox
21c9f82f40 update convlit.go to current spec
R=r
DELTA=17  (2 added, 9 deleted, 6 changed)
OCL=28286
CL=28286
2009-05-05 11:23:39 -07:00
Russ Cox
83e976d53e bug146: array/slice conversion before I left missed conversions
R=ken
OCL=28120
CL=28124
2009-04-30 13:49:58 -07:00
Ian Lance Taylor
625866a977 Conversion from array to slices should work like assignment:
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
2009-04-29 20:15:59 -07:00
Ken Thompson
91ce0ef8f3 bug 139
R=r
OCL=27987
CL=27987
2009-04-28 13:52:56 -07:00
Ken Thompson
f2714e38a4 bug131 has been fixed with no change
R=r
OCL=27980
CL=27980
2009-04-28 13:04:01 -07:00
Ken Thompson
ad36c39211 bug 145
R=r
OCL=27979
CL=27979
2009-04-28 12:28:31 -07:00
Robert Griesemer
eaba458ee6 cannot declare a variable in new scope with same name as type in outer scope
(same as bug144.go but for types instead of constants)

TBR=ken
DELTA=17  (17 added, 0 deleted, 0 changed)
OCL=27855
CL=27855
2009-04-25 13:41:56 -07:00
Ken Thompson
b03b541b7a recognize a defined constant
as a new name in a later declaration
(bug 144)

R=r
OCL=27850
CL=27850
2009-04-24 16:43:31 -07:00
Robert Griesemer
516bf6535c - cannot declare local variable named like a constant in outer scope
- submitted per discussion w/ ken

TBR=ken
DELTA=25  (25 added, 0 deleted, 0 changed)
OCL=27824
CL=27826
2009-04-23 21:54:07 -07:00
Rob Pike
227fe8c530 bug143 is fixed
R=dsymonds
DELTA=58  (26 added, 32 deleted, 0 changed)
OCL=27698
CL=27698
2009-04-21 18:11:34 -07:00
Rob Pike
5689e6472c update golden for bug 143
R=dsymonds
DELTA=6  (6 added, 0 deleted, 0 changed)
OCL=27654
CL=27654
2009-04-21 00:05:19 -07:00
Russ Cox
a62467af93 fix stringrange test
R=ken
OCL=27353
CL=27353
2009-04-13 05:31:44 -07:00
Rob Pike
54ec719391 fix string range to have full unicode range (up to 10FFFF).
add test for string range.

test has minor failure: after loop the index == len(s); should be len(s)-1
in this case.  according to spec, vars are left at position at last
iteration.

R=ken,rsc
DELTA=259  (161 added, 96 deleted, 2 changed)
OCL=27343
CL=27343
2009-04-12 17:01:17 -07:00
Rob Pike
72d867660d bug142 is fixed
R=rsc
OCL=27331
CL=27331
2009-04-10 17:58:10 -07:00
Rob Pike
7d6c0018fb messages changed; updated golden.out for bug037
R=rsc
OCL=27248
CL=27248
2009-04-08 23:34:44 -07:00
Russ Cox
b8035ab5a5 bug142
R=ken
OCL=27202
CL=27202
2009-04-07 23:30:59 -07:00
Russ Cox
3067781ab9 func f() (int, int);
x := f();

used to give
	fatal error: dowidth fn struct struct { int; int }

now gives
	assignment count mismatch: 1 = 2

R=ken
OCL=27198
CL=27201
2009-04-07 22:20:37 -07:00
Rob Pike
a888d4d233 not a bug by current understanding, so delete this file.
6g says: bug138.go:8: constant -1 overflows uint
gccgo says: bug138.go:8:16: error: integer constant overflow

R=rsc
DELTA=19  (0 added, 19 deleted, 0 changed)
OCL=27099
CL=27149
2009-04-07 00:15:49 -07:00
Russ Cox
a99a7f60c3 tests changed - throw calls panic directly now
instead of dereferencing nil, so no more SIGSEGVs.

R=r
DELTA=28  (0 added, 14 deleted, 14 changed)
OCL=26881
CL=26881
2009-03-30 00:28:08 -07:00
Ken Thompson
a805e54a38 golden
R=r
OCL=26699
CL=26699
2009-03-24 16:47:33 -07:00