1
0
mirror of https://github.com/golang/go synced 2024-10-04 09:21:21 -06:00
Commit Graph

621 Commits

Author SHA1 Message Date
Russ Cox
3a23da657d fix build
TBR=austin
OCL=32496
CL=32496
2009-07-29 18:18:12 -07:00
Russ Cox
c217c16a06 bug136 unfixed
R=austin
DELTA=35  (21 added, 14 deleted, 0 changed)
OCL=32469
CL=32474
2009-07-29 15:39:05 -07:00
Russ Cox
3314f8c8e3 another test error tweak
5 known bugs; 0 unexpected bugs; test output differs

R=r
DELTA=3  (2 added, 0 deleted, 1 changed)
OCL=32468
CL=32470
2009-07-29 15:30:54 -07:00
Russ Cox
1ff5897d64 tweak final line of test output:
4 known bugs; 0 unexpected bugs

which should be less scary to people
unfamiliar with the tests.

R=r
DELTA=44  (29 added, 12 deleted, 3 changed)
OCL=32460
CL=32464
2009-07-29 15:11:19 -07:00
Russ Cox
2946069e3f break and continue fixes
labeled break/continue was using
first loop with any label,
not first loop with the right label.

R=ken
OCL=32453
CL=32458
2009-07-29 14:49:01 -07:00
Russ Cox
9271c6402e introduce typecheck pass before walkexpr.
not complete but compiler still works.

R=ken
OCL=32424
CL=32426
2009-07-29 12:47:51 -07:00
Russ Cox
9346c6d901 make every func literal expression allocate,
so that == on func means that the
functions originated in the same
execution of a func literal or definition.

before, there was an inconsistency:

	func() {x++} != func() {x++}

but

	func() {} == func() {}

this CL makes the second case != too,
just like

	make(map[int]int) != make(map[int]int)

R=r
DELTA=202  (71 added, 62 deleted, 69 changed)
OCL=32393
CL=32398
2009-07-28 20:01:00 -07:00
Russ Cox
123ff2ebb8 bug177: anonymous struct fields in reflect
(reported by iant)

R=r
DELTA=50  (32 added, 12 deleted, 6 changed)
OCL=32263
CL=32385
2009-07-28 17:01:46 -07:00
Phil Pennock
d6f89c69c4 Support use of $GOBINDIR to override $HOME/bin
R=r,gri,rsc
APPROVED=rsc
DELTA=53  (12 added, 6 deleted, 35 changed)
OCL=31822
CL=32282
2009-07-28 11:23:24 -07:00
Russ Cox
18840f5429 constant keys for array initializers
R=ken
OCL=32261
CL=32261
2009-07-27 17:58:25 -07:00
Russ Cox
eece85c9a7 move bug148, already fixed, to fixedbugs
R=ken
OCL=32257
CL=32257
2009-07-27 17:32:02 -07:00
Russ Cox
b7dd312c93 bug170; fix test for bug175
R=ken
OCL=32255
CL=32255
2009-07-27 17:24:07 -07:00
Russ Cox
a587d9a73f multiple return in := bug
R=ken
OCL=32253
CL=32253
2009-07-27 16:59:10 -07:00
Russ Cox
059bbdd340 print(1<<x)
R=ken
OCL=32252
CL=32252
2009-07-27 16:17:09 -07:00
Russ Cox
811e59f2fa named string type bugs
R=ken
OCL=32244
CL=32244
2009-07-27 15:16:28 -07:00
Russ Cox
03b25a92a3 catch
a := true;
	a |= a;
in the front end.

R=ken
OCL=32240
CL=32243
2009-07-27 14:55:14 -07:00
Russ Cox
0b2683d1ee do not insert implicit "return;" in empty function body
R=ken
OCL=32239
CL=32239
2009-07-27 14:36:32 -07:00
Russ Cox
dbba489951 do not echo command in errchk,
so that golden.out does not include
the name of the compiler (which is
arch-specific and shows up in diffs).

R=r,iant
DELTA=3  (0 added, 0 deleted, 3 changed)
OCL=31980
CL=31983
2009-07-21 19:45:06 -07:00
Russ Cox
052a66babd runtime: fix init scheduling bug.
if there is a goroutine waiting to run
and the init goroutine enters a system call,
entersyscall was trying to kick off a new
scheduler for the other goroutine, causing
a panic (new goroutines can't run until main.main).

R=r
DELTA=32  (32 added, 0 deleted, 0 changed)
OCL=31982
CL=31982
2009-07-21 19:43:27 -07:00
Ian Lance Taylor
c9399f13f8 You can't set a fixed array to nil.
R=r
DELTA=12  (12 added, 0 deleted, 0 changed)
OCL=31915
CL=31936
2009-07-21 14:05:21 -07:00
Russ Cox
940e381b75 triple quote
R=ken
OCL=31868
CL=31874
2009-07-20 14:15:36 -07:00
Ian Lance Taylor
3321470488 Recognize gccgo error message.
explicit.go:21:5: error: incompatible types in assignment (need explicit conversion)
   explicit.go:26:5: error: incompatible types in assignment (type has no methods)
   explicit.go:27:5: error: incompatible types in assignment (need explicit conversion)
   explicit.go:30:6: error: incompatible types in assignment (need explicit conversion; missing method ‘N’)
   explicit.go:33:7: error: invalid type conversion (need explicit conversion; missing method ‘N’)
   explicit.go:36:5: error: incompatible types in assignment

R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=31805
CL=31807
2009-07-17 16:12:29 -07:00
Russ Cox
db508ccbff baby step: const decls can refer to future
consts in the same factored block

	const (
		X = Y;
		Y = 2;
	)

R=ken
OCL=31782
CL=31782
2009-07-17 13:38:16 -07:00
Russ Cox
e52e9ca82e another step toward eliminating forward declarations.
introduce NodeList* type in compiler to replace OLIST.
this clarifies where lists can and cannot occur.
list append and concatenation are now cheap.
the _r rules are gone from yacc.
rev and unrev are gone.
no more lists of lists.

the representation of assignments is a bit clunkier.
split into OAS (1=1) and OAS2 (2 or more on one side).

delete dead chanrecv3 code.

delay construction of func types.

R=ken
OCL=31745
CL=31762
2009-07-17 01:00:44 -07:00
Russ Cox
be16caf872 step toward no function prototypes.
delay evaluation of most types (all but func)
from parse time to type check time.

R=ken
OCL=31585
CL=31585
2009-07-13 23:38:39 -07:00
Russ Cox
e11447f7da bug148.
R=ken
OCL=31582
CL=31582
2009-07-13 23:29:44 -07:00
Russ Cox
7472f4c951 bug168 (dsymonds) + fix
R=ken
OCL=31399
CL=31399
2009-07-09 12:08:50 -07:00
Russ Cox
a1b64821f8 bug167
R=ken
OCL=31295
CL=31295
2009-07-07 11:48:22 -07:00
Russ Cox
80e4a053d7 update tests for new reflect
R=r
DELTA=12  (0 added, 0 deleted, 12 changed)
OCL=31240
CL=31290
2009-07-07 11:04:51 -07:00
Robert Griesemer
985390bc52 bug167: types declared in different scopes should
be independent of each other

R=rsc
DELTA=28  (28 added, 0 deleted, 0 changed)
OCL=31271
CL=31273
2009-07-07 10:42:42 -07:00
Robert Griesemer
f401cb3e75 fix test
R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=31270
CL=31272
2009-07-07 10:30:31 -07:00
Russ Cox
d436a70193 allow conversion to interface type
when implicit assignment would have been okay.

R=ken
OCL=31225
CL=31227
2009-07-06 17:20:48 -07:00
Russ Cox
8a1bfe89b2 change bug163 to use actual non-letter in identifier
R=r,iant
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=31146
CL=31148
2009-07-03 13:33:00 -07:00
Russ Cox
1af3edc37f maps have == so maps should work as map keys.
fix tests of bad map keys to use slices instead.

R=r
DELTA=7  (0 added, 1 deleted, 6 changed)
OCL=31123
CL=31145
2009-07-03 09:45:15 -07:00
Ian Lance Taylor
7ae0c67825 Recognize gccgo error message.
bug022.go:8:13: error: attempt to index object which is not array, string, or map

R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=31082
CL=31089
2009-07-02 15:55:17 -07:00
Ian Lance Taylor
f1428b2910 Recognize gccgo error messages.
(Amusing side note: the GNU coding standards say: Please do
not use the term "illegal" to refer to erroneous input to a
computer program.  Please use "invalid" for this, and reserve
the term "illegal" for activities prohibited by law.)

indirect1.go:35:3: error: argument must be string or array or slice or map
indirect1.go:36:3: error: argument must be string or array or slice or map
indirect1.go:38:3: error: argument must be string or array or slice or map
indirect1.go:41:3: error: argument must be string or array or slice or map
indirect1.go:42:3: error: argument must be string or array or slice or map
indirect1.go:44:3: error: argument must be string or array or slice or map
indirect1.go:55:3: error: argument must be string or array or slice or map
indirect1.go:56:3: error: argument must be string or array or slice or map
indirect1.go:58:3: error: argument must be string or array or slice or map
indirect1.go:61:3: error: argument must be array or slice
indirect1.go:62:3: error: argument must be array or slice
indirect1.go:64:3: error: argument must be array or slice

R=rsc
DELTA=12  (0 added, 0 deleted, 12 changed)
OCL=31081
CL=31088
2009-07-02 15:54:57 -07:00
Russ Cox
5d5904bb4d bug163 bug164 bug166
R=ken
OCL=30889
CL=30889
2009-06-29 17:46:22 -07:00
Russ Cox
df36629d76 bug041 not a bug.
can now forward declare across files

R=r
DELTA=15  (0 added, 15 deleted, 0 changed)
OCL=30873
CL=30880
2009-06-29 17:21:33 -07:00
Russ Cox
3119221ed8 bogus test: planning to allow forward declarations
of structs/interfaces in other files in the package.

R=r
DELTA=12  (0 added, 12 deleted, 0 changed)
OCL=30865
CL=30868
2009-06-29 15:13:18 -07:00
Ian Lance Taylor
6a71f43f82 6g appears to permit semicolons to be omitted after qualified
identifiers.  This is not one of the exceptions permitted by
th spec.

R=ken,rsc
DELTA=11  (11 added, 0 deleted, 0 changed)
OCL=30844
CL=30852
2009-06-29 12:52:08 -07:00
Rob Pike
d330c712c1 Getenv: almost no one wants the error, so make it return a string that may be empty.
Getenverror is the new name for the old routine that returns an error too.

R=rsc
DELTA=35  (7 added, 7 deleted, 21 changed)
OCL=30818
CL=30821
2009-06-26 20:28:41 -07:00
Russ Cox
480f51243c bug165
R=ken
OCL=30783
CL=30783
2009-06-25 21:02:39 -07:00
Russ Cox
cf370a6206 add ./ to imports where necessary
R=r
DELTA=51  (4 added, 4 deleted, 43 changed)
OCL=30759
CL=30778
2009-06-25 20:13:56 -07:00
Rob Pike
7de4883412 cannot have interfaces refer to themselves as map keys
R=rsc
DELTA=11  (11 added, 0 deleted, 0 changed)
OCL=30774
CL=30774
2009-06-25 18:44:28 -07:00
Russ Cox
4c5c0f437f update tests for CL 30586.
won't submit unless 30586 goes in.

R=r
DELTA=94  (65 added, 16 deleted, 13 changed)
OCL=30592
CL=30755
2009-06-25 14:44:09 -07:00
Rob Pike
23d9197160 canonicalize bug122.go
R=rsc
DELTA=6  (1 added, 3 deleted, 2 changed)
OCL=30604
CL=30604
2009-06-22 14:40:08 -07:00
Russ Cox
81be9155b6 test non-trivial conversions and assignments,
named and unnamed.

R=r
DELTA=21  (21 added, 0 deleted, 0 changed)
OCL=30518
CL=30533
2009-06-19 14:00:39 -07:00
Russ Cox
410ba58604 do use $$ in path names, so that multiple
runs on the same machine don't collide.

R=r
DELTA=4  (0 added, 1 deleted, 3 changed)
OCL=30426
CL=30429
2009-06-17 13:21:01 -07:00
Robert Griesemer
fe537dc8d5 `` strings should not accept newlines as characters
R=r
DELTA=17  (17 added, 0 deleted, 0 changed)
OCL=30417
CL=30422
2009-06-17 11:44:51 -07:00
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
bf5c0c957c bug: pointer arithmetic involving large offsets
needs to dereference the base pointer to make
sure it catches nil.

R=r,ken
DELTA=21  (21 added, 0 deleted, 0 changed)
OCL=30083
CL=30101
2009-06-09 09:45:30 -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
b014be75d2 fix 386 malloc tests,
detect 386 darwin breakpoint line.

R=r
DELTA=22  (4 added, 0 deleted, 18 changed)
OCL=29929
CL=29944
2009-06-05 10:59:37 -07:00
Rob Pike
6739b8d606 string([]int) is now implemented
R=rsc
DELTA=18  (10 added, 2 deleted, 6 changed)
OCL=29909
CL=29909
2009-06-04 16:51:47 -07:00
Russ Cox
2f2577a4f6 bug161, fixed
R=ken
OCL=29907
CL=29907
2009-06-04 16:18:13 -07:00
Russ Cox
3a0df4c451 more 386 runtime fixes.
can pass many tests;
current stumbling block is an 8l bug.

R=r
DELTA=122  (83 added, 8 deleted, 31 changed)
OCL=29872
CL=29876
2009-06-04 11:16:03 -07:00
Russ Cox
f51ca384eb fix handling of floating point zero constant 0p+0
R=r
DELTA=25  (25 added, 0 deleted, 0 changed)
OCL=29875
CL=29875
2009-06-04 11:06:37 -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
Russ Cox
9e0fec9c9c update Go tree to use new syscall package.
R=r
DELTA=713  (109 added, 386 deleted, 218 changed)
OCL=29707
CL=29722
2009-06-01 22:14:39 -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
Russ Cox
ead9f8be3a new 64-bit math test.
allow multiline recipes in run.

R=r
DELTA=712  (708 added, 2 deleted, 2 changed)
OCL=29641
CL=29666
2009-05-31 12:35:11 -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
Russ Cox
5d1d8a8258 integer conversions and test.
R=ken
OCL=29577
CL=29589
2009-05-29 09:17:35 -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
Russ Cox
750a856742 bug151, bug152 -> fixedbugs
R=ken
OCL=29425
CL=29427
2009-05-26 21:11:43 -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
54b0065777 another interface conversion test
R=r
DELTA=21  (21 added, 0 deleted, 0 changed)
OCL=29212
CL=29249
2009-05-22 09:53:37 -07:00
Russ Cox
d33d763781 channel direction tests
(will submit with compiler fixes).

R=r
DELTA=44  (44 added, 0 deleted, 0 changed)
OCL=29211
CL=29248
2009-05-22 09:53:25 -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
d5269d0008 tests for new initializer syntax
R=r
DELTA=79  (79 added, 0 deleted, 0 changed)
OCL=29196
CL=29202
2009-05-21 14:46:13 -07:00
Russ Cox
8b6b380605 stricter rules for assignment.
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
2009-05-21 14:06:24 -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
Ian Lance Taylor
bc5620c2e0 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
2009-05-19 15:23:43 -07:00
Ian Lance Taylor
49fceff6af Don't bother to import "os" just so that we can call
os.Exit(0) at the end of main.

R=rsc
DELTA=6  (0 added, 6 deleted, 0 changed)
OCL=28967
CL=28969
2009-05-16 23:12:28 -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
c7d30bceb2 describe each interface test
R=r
DELTA=20  (20 added, 0 deleted, 0 changed)
OCL=28707
CL=28716
2009-05-12 16:09:47 -07:00
Russ Cox
28516d4c78 update reflect for upcoming interface representation change.
test case for new change.

both work with the current compiler too.

R=r
DELTA=150  (145 added, 2 deleted, 3 changed)
OCL=28703
CL=28715
2009-05-12 16:08:16 -07:00
Russ Cox
3619f1ea6a change utf8.FullRuneInString and utf8.DecodeRuneInString
to use single string argument instead of string, index.

R=r
DELTA=136  (9 added, 7 deleted, 120 changed)
OCL=28642
CL=28644
2009-05-11 14:10:34 -07:00
Russ Cox
9a861b6aaa check for redeclaration of package name
R=r
DELTA=10  (10 added, 0 deleted, 0 changed)
OCL=28585
CL=28591
2009-05-08 16:40:55 -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
Russ Cox
918afd9491 move things out of sys into os and runtime
R=r
OCL=28569
CL=28573
2009-05-08 15:21:41 -07:00
Rob Pike
c367d1b789 Move sys.Reflect and sys.Unreflect into unsafe.
R=rsc
DELTA=19  (4 added, 5 deleted, 10 changed)
OCL=28563
CL=28566
2009-05-08 14:57:56 -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
9ab8129ebe test of struct with embedded interface.
also tests method calls on ptr to interface value.

R=r
DELTA=74  (74 added, 0 deleted, 0 changed)
OCL=28419
CL=28424
2009-05-07 13:43:00 -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