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

329 Commits

Author SHA1 Message Date
Russ Cox
8e996304f3 gc: multiple return value at top-level invoked multiple times
Fixes #402.

R=ken2
CC=golang-dev
https://golang.org/cl/186214
2010-01-18 17:00:38 -08:00
Russ Cox
e0059ae811 gc: bug243
Fixes #481.

R=ken2
CC=golang-dev
https://golang.org/cl/186213
2010-01-18 16:52:18 -08:00
Russ Cox
307a899d5b gc: bug238
Fixes #471.

R=ken2
CC=golang-dev
https://golang.org/cl/181184
2010-01-08 00:01:03 -08:00
Russ Cox
1b1f39eb86 gc: bug219, bug239, bug240
Fixes #475.

R=ken2
CC=golang-dev
https://golang.org/cl/183157
2010-01-07 23:24:48 -08:00
Russ Cox
c6f4d68667 gc: bug241
Fixes #495.

R=ken2
CC=golang-dev
https://golang.org/cl/183156
2010-01-07 23:20:00 -08:00
Ian Lance Taylor
939bab606a Add a test for issue 337.
gccgo currently miscompiles this test.

R=rsc
CC=golang-dev
https://golang.org/cl/181050
2009-12-23 22:08:27 -08:00
Ian Lance Taylor
fa98cf6eef More evaluation order tests, for global variables and switch.
gccgo currently fails this test.

R=rsc
CC=golang-dev
https://golang.org/cl/179108
2009-12-18 21:59:47 -08:00
Russ Cox
6a4b2492b3 gc: fix compiler crash
R=ken2
CC=dho
https://golang.org/cl/179097
2009-12-17 15:08:55 -08:00
Russ Cox
d16bc7a9f2 runtime: return zero value in x, ok = <-c when ok == false
Fixes #401.

R=ken2
https://golang.org/cl/180053
2009-12-15 16:59:23 -08:00
Russ Cox
c715b58dad gc: fix import name resolution
Fixes #403.

R=ken2
https://golang.org/cl/180052
2009-12-15 16:44:28 -08:00
Russ Cox
5d754bfaea gc: bug fixes.
* better error for lookup of unexported field
  * do not assign "ideal string" type to typed string literal
  * do not confuse methods and fields during interface check

Fixes #410.
Fixes #411.
Fixes #426.

R=ken2
https://golang.org/cl/179069
2009-12-15 16:22:04 -08:00
Russ Cox
101f499fa5 gc: allow ... in method lists
R=ken2
https://golang.org/cl/179070
2009-12-15 16:20:37 -08:00
Russ Cox
d122bb2193 gc: double-check usage of ...
Fixes #423.

R=ken2
https://golang.org/cl/180045
2009-12-15 14:26:50 -08:00
Russ Cox
0282cc5e74 gc: var x, ok = m[y]
Fixes #384.

R=ken2
https://golang.org/cl/179061
2009-12-15 14:26:33 -08:00
Ian Lance Taylor
84e7cb0611 Tweak test to work with both 6g and gccgo.
Pull the struct into a single line, since 6g reports the error
on the last line of the struct definition and gccgo reports it
on the first line.

6g:
bug215.go:12: invalid recursive type A

gccgo:
bug215.go:12:6: error: invalid recursive type ‘A’

R=rsc
https://golang.org/cl/180044
2009-12-15 13:57:24 -08:00
Russ Cox
b301351df9 test/fixedbug: drop obsolete bug125, bug166
R=gri
CC=golang-dev
https://golang.org/cl/173044
2009-12-10 12:54:30 -08:00
Robert Griesemer
60d4e30dbb make test/fixedbugs save for optional semis
R=rsc
https://golang.org/cl/173045
2009-12-10 11:25:54 -08:00
Russ Cox
9da6666a8a gc: check for assignment to private fields during initialization
R=ken2
https://golang.org/cl/165055
2009-12-03 22:09:58 -08:00
Russ Cox
c6e316a4b9 gc: handle _ = <-c in select.
Fixes #238.

R=ken2
https://golang.org/cl/163098
2009-12-03 01:30:19 -08:00
Russ Cox
05a1eb1ab0 gc: recursive type error
Fixes #245.

R=ken2
https://golang.org/cl/164094
2009-12-03 01:12:02 -08:00
Russ Cox
41861a8812 gc: better diagnosis of initialization loops
Fixes bug 292.

R=ken2
https://golang.org/cl/164093
2009-12-03 00:51:03 -08:00
Russ Cox
e733766dda gc: minor import grammar bug fixes
Fixes #364.

R=ken2
https://golang.org/cl/164092
2009-12-03 00:10:32 -08:00
Russ Cox
272d156357 gc: function argument ordering bug
Fixes #370.

R=ken2
https://golang.org/cl/163097
2009-12-02 23:54:51 -08:00
Russ Cox
b7c4314ecb gc: correct type check for x, ok map assignment
Fixes #288.

R=ken2
https://golang.org/cl/157162
2009-11-24 16:11:48 -08:00
Russ Cox
a338231526 gc: five bug fixes, one better error.
* check for struct literal assignment to private fields.
* record, fix crash involving parallel map assignment.
* avoid infinite recursion in exportassignok.
* make floating point bounds check precise.
* avoid crash on invalid receiver.

* add context to error about implicit assignment.

Fixes #86.
Fixes #88.
Fixes #158.
Fixes #174.
Fixes #201.
Fixes #204.

R=ken2
https://golang.org/cl/154144
2009-11-15 12:57:09 -08:00
Russ Cox
71983af4a1 bug212, bug213.
R=ken
http://go/go-review/1026032
2009-11-08 23:22:06 -08:00
Robert Griesemer
e6f85af2bb cleaning up bug132
R=rsc
http://go/go-review/1017012
2009-11-02 09:42:53 -08:00
Ian Lance Taylor
d7ad3c4e86 Match gccgo error messages.
bug205.go:14:12: error: index must be integer
bug205.go:15:12: error: index must be integer
bug205.go:16:12: error: incompatible type for map index

R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=35957
CL=35960
2009-10-21 11:42:09 -07:00
Russ Cox
60ff8cc86f address bug193 and add note to spec about it.
R=ken
OCL=35920
CL=35920
2009-10-20 08:27:14 -07:00
Russ Cox
a15648658f bug196
R=ken
OCL=35905
CL=35905
2009-10-19 21:10:29 -07:00
Russ Cox
62c4818ee0 bug136
R=ken
OCL=35902
CL=35904
2009-10-19 20:39:18 -07:00
Russ Cox
1be74762c1 bug169
R=ken
OCL=35899
CL=35899
2009-10-19 19:55:17 -07:00
Russ Cox
4c3a85d73a 6g bug fixes:
* bug211
 * embedded interfaces with lowercase methods
 * var _ = f() at top level

R=ken
OCL=35898
CL=35898
2009-10-19 19:27:40 -07:00
Russ Cox
8fffa1d698 bug190.
also eliminate float80 dregs

R=ken
OCL=35894
CL=35896
2009-10-19 18:47:37 -07:00
Russ Cox
c736b6579f bug209
R=ken
OCL=35546
CL=35546
2009-10-09 16:01:32 -07:00
Russ Cox
680ee6af63 add & fix bug208, from ken.
fix bug198.

R=ken
OCL=35504
CL=35507
2009-10-08 23:03:34 -07:00
Russ Cox
55edf49a01 add & fix bug207: rewritten if condition
was discarding initialization work.

R=ken
OCL=35454
CL=35457
2009-10-07 22:19:42 -07:00
Russ Cox
6f1698774d undo 35108 (disallow parens around type in struct literal).
allow parens around [...]int in struct literal.

R=ken
OCL=35112
CL=35130
2009-09-29 21:21:14 -07:00
Russ Cox
9c3c140984 disallow parens around type in struct literal syntax,
per discussion with gri.

R=ken
OCL=35108
CL=35108
2009-09-29 16:05:44 -07:00
Russ Cox
7743ffead4 disallow interface { x, y() }
R=ken
OCL=35042
CL=35044
2009-09-28 14:05:34 -07:00
Russ Cox
20011bc878 unused imports
R=r
OCL=34731
CL=34731
2009-09-17 10:27:04 -07:00
Russ Cox
ae54cf73ca last round: non-package code
R=r
DELTA=127  (38 added, 3 deleted, 86 changed)
OCL=34640
CL=34650
2009-09-15 12:42:24 -07:00
Russ Cox
1a3198907b fix "declared and not used" in tests;
also template/template.go, missed last time.

R=r
DELTA=116  (61 added, 10 deleted, 45 changed)
OCL=34620
CL=34622
2009-09-14 21:03:53 -07:00
Russ Cox
2204cfddea fix bug206.
delay calls to savex as long as possible.

R=ken
OCL=34535
CL=34546
2009-09-10 17:33:01 -07:00
Russ Cox
f4ee9f133c check type of string/map/array index expressions
R=ken
OCL=34478
CL=34480
2009-09-09 01:31:10 -07:00
Russ Cox
e780fa8669 defining package block names must override
universe block names.

BUG=2097244
R=ken
OCL=34295
CL=34473
2009-09-09 01:01:39 -07:00
Russ Cox
5438be4541 write-only variable _
R=ken
OCL=34465
CL=34470
2009-09-08 23:16:19 -07:00
Russ Cox
f2a8cd5ad9 corrected bug187; dropped on the floor somehow
R=austin
DELTA=23  (23 added, 0 deleted, 0 changed)
OCL=34340
CL=34346
2009-09-03 16:17:06 -07:00
Russ Cox
a18208fb60 fix range on invalid utf8 bug
R=r
DELTA=42  (21 added, 20 deleted, 1 changed)
OCL=34328
CL=34333
2009-09-03 13:56:06 -07:00
Russ Cox
a1391c2d13 fix one bug involving [...] constructors.
added iant's bug202 (in main code)
and ken's bug203 (in init function).
bug187 remains at large.

R=ken
OCL=34293
CL=34293
2009-09-02 23:26:13 -07:00
Russ Cox
ee2d5128d6 the last bug involving type hashes
R=ken
OCL=34244
CL=34249
2009-09-02 09:09:32 -07:00
Russ Cox
bebe06a784 type switch bug involving function parameter names
R=ken
OCL=34232
CL=34232
2009-09-01 18:04:49 -07:00
Russ Cox
27c4e7e74e catch package net import "net" for release
R=ken
OCL=34205
CL=34207
2009-09-01 14:12:09 -07:00
Ian Lance Taylor
1a05177d44 Match gccgo error messages.
bug197.go:10:5: error: incompatible type in initialization
bug197.go:11:5: error: incompatible type in initialization
bug197.go:12:5: error: incompatible type in initialization
bug197.go:13:5: error: incompatible type in initialization
bug197.go:20:13: error: incompatible types in binary expression
bug197.go:21:27: error: incompatible types in binary expression

R=rsc
DELTA=6  (0 added, 0 deleted, 6 changed)
OCL=34135
CL=34177
2009-08-31 21:39:08 -07:00
Russ Cox
6e8524be18 array index bug
x[i]
x not addressable, i >= UINF
double evaluated i
second eval killed live registers

manifested as gob instability

R=ken
OCL=34097
CL=34099
2009-08-30 18:47:48 -07:00
Russ Cox
d66d65da96 bug132
R=ken
OCL=33792
CL=33803
2009-08-24 17:06:10 -07:00
Ian Lance Taylor
92ac4bff74 Match gccgo error messages.
bug192.go:11:5: error: redefinition of ‘fmt’
bug192.go:9:8: note: previous definition of ‘fmt’ was here

R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=33780
CL=33790
2009-08-24 15:56:39 -07:00
Russ Cox
14be733a25 bug197
R=ken
OCL=33765
CL=33765
2009-08-24 13:41:47 -07:00
Russ Cox
ef3e6810b8 bug189
R=ken
OCL=33745
CL=33745
2009-08-24 09:23:04 -07:00
Russ Cox
28b655ea07 more interface embedding tests
6g's error for I4 is not quite accurate
(it calls I4 a non-interface) but also
not a crash or infinite loop.

R=iant
DELTA=15  (15 added, 0 deleted, 0 changed)
OCL=33701
CL=33709
2009-08-21 21:30:24 -07:00
Russ Cox
59e2e54eab fix bug195
R=ken
OCL=33700
CL=33700
2009-08-21 18:07:11 -07:00
Rob Pike
770485e522 add bug to capture double declaration of name in file and package block
R=rsc
DELTA=12  (12 added, 0 deleted, 0 changed)
OCL=33554
CL=33563
2009-08-19 17:37:23 -07:00
Russ Cox
63aeaa2a03 fix import dot bug
R=ken
OCL=33526
CL=33528
2009-08-19 11:32:46 -07:00
Ian Lance Taylor
f7e4fc9b1f Match gccgo error messages.
bug165.go:13:6: error: invalid recursive type 'S'

This is a different line from the 6g error message, which is
"invalid map key type".  I accomodated both compilers by
merging the line.

bug188.go:13:2: error: unexpected reference to package

I made the error message less specific, which I think is fine
here.

R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=33398
CL=33426
2009-08-17 17:40:52 -07:00
Rob Pike
74dd0ab670 fix up some irregular indentation
R=rsc
OCL=33382
CL=33391
2009-08-17 13:30:22 -07:00
Ian Lance Taylor
91173b8930 Recognize gccgo error messages.
bug039.go:6:7: error: redefinition of 'x'
bug039.go:5:1: note: previous definition of 'x' was here

bug049.go:6:9: error: incompatible types in binary expression

bug062.go:6:7: error: incompatible type in initialization

bug086.go:5:1: error: control reaches end of non-void function

bug103.go:8:2: error: variable has no type

bug121.go:9:2: error: expected signature or type name

bug131.go:7:7: error: incompatible type in initialization

bug165.go:10:8: error: expected complete type

bug171.go:5:1: error: control reaches end of non-void function
bug171.go:6:1: error: control reaches end of non-void function

bug172.go:7:6: error: expected integer type

bug182.go:7:2: error: if statement expects boolean expression

bug183.go:10:5: error: incompatible types in assignment
bug183.go:19:5: error: incompatible types in assignment

R=rsc
DELTA=15  (0 added, 0 deleted, 15 changed)
OCL=33168
CL=33175
2009-08-13 09:42:28 -07:00
Russ Cox
3e98a40793 bug188 - sort(x)
R=ken
OCL=33123
CL=33123
2009-08-12 15:58:31 -07:00
Russ Cox
b5c57fea96 delete forward type declarations
R=r
DELTA=163  (1 added, 149 deleted, 13 changed)
OCL=33106
CL=33111
2009-08-12 14:40:47 -07:00
Russ Cox
5b62b19d43 convert non-pkg go files to whole-package compilation.
mostly removing forward declarations.

R=r
DELTA=138  (2 added, 127 deleted, 9 changed)
OCL=33068
CL=33099
2009-08-12 13:18:54 -07:00
Russ Cox
866b272336 bug186 - f(iota)
R=ken
OCL=33051
CL=33051
2009-08-11 17:05:22 -07:00
Russ Cox
6be0f50b97 bug159
R=ken
OCL=32902
CL=32914
2009-08-07 16:47:54 -07:00
Russ Cox
39b12e2dcb bug185 - return b,a from func() (a,b int)
R=ken
OCL=32900
CL=32900
2009-08-07 14:38:31 -07:00
Russ Cox
d1ee5d6e8f bug184 - assignment compatibility in unpacked multireturn
R=ken
OCL=32890
CL=32894
2009-08-07 14:00:18 -07:00
Russ Cox
aa7bd48389 bug183 - embedded vs non-embedded struct field in eqtype
R=ken
OCL=32888
CL=32888
2009-08-07 13:23:09 -07:00
Russ Cox
468f244416 bug182 - compiler crash
R=ken
OCL=32887
CL=32887
2009-08-07 13:17:28 -07:00
Russ Cox
6c2738eb43 bug181 - type T *struct { T } is an invalid embedded type
R=ken
OCL=32886
CL=32886
2009-08-07 13:14:01 -07:00
Russ Cox
54b403723b delay := processing
R=ken
OCL=32772
CL=32772
2009-08-05 00:42:44 -07:00
Russ Cox
4dec8ef35a get function calls out of the way before
allocating registers in shift and div.

fix behavior when res == a reserved register.

R=ken
OCL=32765
CL=32767
2009-08-04 19:16:57 -07:00
Russ Cox
9dc22b6d6f more 6g reorg; checkpoint.
typecheck.c is now responsible for all type checking
except for assignment and function argument "..."

R=ken
OCL=32661
CL=32667
2009-08-03 11:58:52 -07:00
Russ Cox
b754b4348f delete some code from walkexpr that is now
handled by typecheck.

second switch is gone

move floating point minus into back end

R=ken
OCL=32558
CL=32558
2009-07-30 18:56:44 -07:00
Russ Cox
34b277f046 use errchk in more places.
let errchk exit 0 even if it has reported a BUG.
it echoed BUG and that's all that matters.

R=r
DELTA=143  (1 added, 89 deleted, 53 changed)
OCL=32533
CL=32542
2009-07-30 16:46:14 -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
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
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
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
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
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
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
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
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
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
3751b259cb bug140 is fixed
R=ken
OCL=29989
CL=29999
2009-06-06 19:28:01 -07:00
Russ Cox
2f2577a4f6 bug161, fixed
R=ken
OCL=29907
CL=29907
2009-06-04 16:18:13 -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
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
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
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
Russ Cox
750a856742 bug151, bug152 -> fixedbugs
R=ken
OCL=29425
CL=29427
2009-05-26 21:11:43 -07:00
Rob Pike
70d711dfb8 bug150 is fixed
R=ken
OCL=29407
CL=29407
2009-05-26 16:06:03 -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
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
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
Ian Lance Taylor
be827826ef Verify that a send on a sychronous channel waits until the
value has been received.  This failed with gccgo before
today.

R=ken,r
DELTA=18  (18 added, 0 deleted, 0 changed)
OCL=28185
CL=28190
2009-05-02 12:47:33 -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
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
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
David Symonds
2f8a2dc193 Extend fixedbugs/bug143.go with function return values,
as a regression test for the fix made in s2/27706.

R=r
APPROVED=r
DELTA=14  (13 added, 0 deleted, 1 changed)
OCL=27707
CL=27709
2009-04-21 20:26:26 -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
Russ Cox
e2bf22715d make string take []byte only, so have to use *[10]byte to convert
R=r
DELTA=4  (0 added, 0 deleted, 4 changed)
OCL=27578
CL=27584
2009-04-16 23:07:15 -07:00
Russ Cox
60ce95d7a1 code changes for array conversion.
as a reminder, the old conversion
was that you could write

	var arr [10]byte;
	var slice []byte;
	slice = arr;

but now you have to write

	slice = &arr;

the change eliminates an implicit &, so that
the only implicit &s left are in the . operator
and in string(arr).

also, removed utf8.EncodeRuneToString
in favor of string(rune).

R=r
DELTA=83  (1 added, 23 deleted, 59 changed)
OCL=27531
CL=27534
2009-04-15 20:27:45 -07:00
Rob Pike
72d867660d bug142 is fixed
R=rsc
OCL=27331
CL=27331
2009-04-10 17:58:10 -07:00
Ken Thompson
b8be809c10 ^ type(const) now inverts "enough" bits
^ signed(const) becomes illegal
^ unsigned(const) becomes legal

R=r
OCL=26697
CL=26697
2009-03-24 16:40:38 -07:00
Rob Pike
7525e085d2 bug141 is fixed
R=ken
DELTA=56  (26 added, 30 deleted, 0 changed)
OCL=26628
CL=26628
2009-03-22 21:02:17 -07:00
Ian Lance Taylor
386845b23f Match gccgo error messages.
bug090.go:41:6: error: floating point constant truncated to integer
bug090.go:32:6: error: floating point constant truncated to integer
bug090.go:34:14: error: floating point constant truncated to integer
bug090.go:37:5: error: incompatible types in assignment
bug090.go:40:5: error: incompatible types in assignment

R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=26564
CL=26574
2009-03-20 10:34:46 -07:00
Russ Cox
5fbadf0bc3 warn -> yyerror in mparith.
close two more bugs.

R=ken
OCL=26226
CL=26226
2009-03-12 19:57:30 -07:00
Russ Cox
8f194bf5ff make 6g constants behave as ken proposes. (i hope.)
various bug fixes and tests involving constants.

test/const1.go is the major new test case.

R=ken
OCL=26216
CL=26224
2009-03-12 19:04:38 -07:00
Ken Thompson
767845b6fa bug 125
R=r
OCL=26146
CL=26146
2009-03-11 17:37:04 -07:00
Ken Thompson
48f6b516e2 bug 137
R=r
OCL=26142
CL=26142
2009-03-11 16:25:45 -07:00
Ken Thompson
d27e9f528d bug086
R=r
OCL=26090
CL=26090
2009-03-10 19:16:31 -07:00
Rob Pike
99d00eae3c delete vestigial references to package syscall
R=rsc
DELTA=8  (0 added, 5 deleted, 3 changed)
OCL=25857
CL=25861
2009-03-06 16:03:59 -08:00
Russ Cox
63985b489b bug085 bug129
R=ken
OCL=25787
CL=25791
2009-03-05 15:57:03 -08:00
Rob Pike
5ef8e1d47e update missed test case to {}
R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=25648
CL=25654
2009-03-03 16:09:12 -08:00
Russ Cox
be2edb5761 Automated g4 rollback of changelist 25024,
plus significant hand editing.

Back to T{x} for composite literals.

R=r
OCL=25612
CL=25632
2009-03-03 08:39:12 -08:00
Rob Pike
88b1f8594a bug130 is fixed
R=ken
OCL=25448
CL=25448
2009-02-25 16:31:42 -08:00
Russ Cox
d3d0c256be bug123
R=ken
OCL=25075
CL=25075
2009-02-16 17:44:05 -08:00
Russ Cox
9f8f2e6130 convert composite literals from { } to ( ).
only non-trivial changes are in
	convlit1.go
	golden.out

R=gri
OCL=25019
CL=25024
2009-02-13 14:48:32 -08:00
Russ Cox
49e2087848 insert type assertions when narrowing.
R=r
OCL=24349
CL=24913
2009-02-11 17:55:16 -08:00
Russ Cox
b0009bef20 bug064
make f(g()) work when g returns multiple
args with names different than f expects.

func swap(a, b int) (c, d int) {
	return b, a
}

swap(swap(1,2))

R=ken
OCL=24474
CL=24476
2009-02-05 15:22:49 -08:00
Rob Pike
f9cc900ae8 bugs cleanup, including deleting one near-identical duplicate bug
R=rsc
DELTA=52  (15 added, 37 deleted, 0 changed)
OCL=24274
CL=24274
2009-02-03 16:59:26 -08:00
Russ Cox
4cf7711568 update go code tree to new func rules.
R=r
DELTA=367  (111 added, 59 deleted, 197 changed)
OCL=23957
CL=23960
2009-01-30 14:39:31 -08:00
Rob Pike
712522a6d8 bug135 is fixed
TBR=ken
OCL=23650
CL=23650
2009-01-27 19:30:44 -08:00
Russ Cox
f1fe21a08f bug134
R=ken
OCL=23532
CL=23532
2009-01-26 17:06:20 -08:00
Russ Cox
4efad58d0a bug133
R=ken
OCL=23528
CL=23528
2009-01-26 16:57:24 -08:00