Commit Graph

267 Commits

Author SHA1 Message Date
Russ Cox
c66b49845c 8g: bug272
Fixes #589.

R=ken2
CC=golang-dev
https://golang.org/cl/1043042
2010-04-30 14:04:34 -07:00
Russ Cox
253fd30e66 gc: bug271
Fixes #662.

R=ken2
CC=golang-dev
https://golang.org/cl/978043
2010-04-30 13:27:08 -07:00
Russ Cox
560283c880 gc: bug270
Fixes #746.

R=ken2
CC=golang-dev
https://golang.org/cl/1040042
2010-04-30 13:04:16 -07:00
Russ Cox
77817e08d5 gc: never include ( ) on singleton func return type
Fixes #749.

R=ken2
CC=golang-dev
https://golang.org/cl/963043
2010-04-29 16:07:14 -07:00
Russ Cox
10eb76b04e gc: bug268
Fixes #745.

R=ken2
CC=golang-dev
https://golang.org/cl/1008045
2010-04-29 15:52:27 -07:00
Russ Cox
c6138efbcb runtime: closures, defer bug fix for Native Client
Enable package tests for Native Client build.

R=r
CC=golang-dev
https://golang.org/cl/957042
2010-04-22 17:52:22 -07:00
Russ Cox
d9254d00f9 gc: zero unnamed return values on entry if func has defer
R=ken2
CC=golang-dev
https://golang.org/cl/891050
2010-04-12 14:28:27 -07:00
Russ Cox
fe7826858c gc: make sure main.main has correct type
R=ken2
CC=golang-dev
https://golang.org/cl/883049
2010-04-11 14:51:35 -07:00
Russ Cox
00f9f0c056 single argument panic
note that sortmain.go has been run through hg gofmt;
only the formatting of the day initializers changed.
i'm happy to revert that formatting if you'd prefer.

stop on error in doc/progs/run

R=r
CC=golang-dev
https://golang.org/cl/850041
2010-03-30 10:34:57 -07:00
Russ Cox
3908c16ffe gc: bug265
Fixes #700.

R=ken2
CC=golang-dev
https://golang.org/cl/839041
2010-03-29 15:27:59 -07:00
Russ Cox
d2cdb24786 gc: tests omitted from the last bug fix
R=ken2
CC=golang-dev
https://golang.org/cl/748041
2010-03-24 22:12:59 -07:00
Rob Pike
325cf8ef21 delete all uses of panicln by rewriting them using panic or,
in the tests, println+panic.
gofmt some tests too.

R=rsc
CC=golang-dev
https://golang.org/cl/741041
2010-03-24 16:46:53 -07:00
Russ Cox
4f89dcdf99 5g/6g/8g: fix double function call in slice
Fixes #654.

R=ken2
CC=golang-dev
https://golang.org/cl/310041
2010-03-08 14:19:28 -08:00
Russ Cox
ba50599e46 8g: make a[byte(x)] truncate x
R=ken2
CC=golang-dev
https://golang.org/cl/223069
2010-02-26 13:15:29 -08:00
Russ Cox
1734cb02e7 gc: recursive interface embedding
Fixes #287.

R=ken2
CC=golang-dev
https://golang.org/cl/215048
2010-02-18 11:15:36 -08:00
Russ Cox
fb5506600f 8g: respect ullman numbers in float comparison
Fixes #602.

R=ken2
CC=golang-dev
https://golang.org/cl/212045
2010-02-17 15:28:45 -08:00
Russ Cox
7b5789b584 gc: undo attempt at fixing recursive interface embedding
Fixes #582.

Update #287
Status: Accepted
Bug fix was too intrusive; undo and reopen issue.

R=ken2
CC=golang-dev
https://golang.org/cl/209044
2010-02-16 17:44:15 -08:00
Russ Cox
e7fc5c2789 gc: test & fix handling of very long string constants
R=ken2
CC=golang-dev
https://golang.org/cl/207106
2010-02-16 10:16:24 -08:00
Russ Cox
5ab8f00bf8 gc: diagnose invalid array bounds
Fixes #587.

R=ken2
CC=golang-dev
https://golang.org/cl/207085
2010-02-12 13:59:02 -08:00
Ian Lance Taylor
4b4c6ab02d Struct field ambiguity test.
gccgo gets this wrong at the moment.

R=rsc
CC=golang-dev
https://golang.org/cl/205044
2010-02-08 15:40:09 -08:00
Ian Lance Taylor
3c686bd23f Match gccgo error message.
bug251.go:11:2: error: invalid recursive interface

R=rsc
CC=golang-dev
https://golang.org/cl/204052
2010-02-05 20:56:20 -08:00
Ian Lance Taylor
db3ec4f239 Match gccgo error messages.
bug121.go:12:3: error: name list not allowed in interface type
bug121.go:16:2: error: expected signature or type name

semi1.go:10:76: error: unexpected semicolon or newline before ‘{’
semi1.go:10:5: error: reference to undefined name ‘x’
semi1.go:10:8: error: reference to undefined name ‘y’
semi1.go:12:3: error: reference to undefined name ‘z’

semi2.go:10:79: error: unexpected semicolon or newline before ‘{’
semi2.go:10:9: error: reference to undefined name ‘x’

semi3.go:10:79: error: unexpected semicolon or newline before ‘{’
semi3.go:10:6: error: reference to undefined name ‘x’
semi3.go:10:9: error: reference to undefined name ‘y’
semi3.go:10:12: error: reference to undefined name ‘z’
semi3.go:12:3: error: reference to undefined name ‘z’

semi4.go:11:2: error: unexpected semicolon or newline before ‘{’
semi4.go:10:6: error: reference to undefined name ‘x’
semi4.go:12:3: error: reference to undefined name ‘z’

semi5.go:10:1: error: unexpected semicolon or newline before ‘{’

semi7.go:11:2: error: unexpected semicolon or newline before ‘else’
semi7.go:10:5: error: reference to undefined name ‘x’

slice.go:9:11: error: missing lower bound in slice expression
slice.go:9:9: error: reference to undefined name ‘y’
slice.go:9:12: error: reference to undefined name ‘z’

R=rsc
CC=golang-dev
https://golang.org/cl/201061
2010-02-04 21:31:30 -08:00
Russ Cox
8bef7fdc39 bug252: make ... vs ...T crossing an error, at least for now
R=r
CC=golang-dev
https://golang.org/cl/199066
2010-02-02 15:00:13 -08:00
Russ Cox
44898c7b76 gc: bug250, bug251 - recursive interface types
Fixes #287.

R=ken2
CC=golang-dev
https://golang.org/cl/199057
2010-02-01 23:58:49 -08:00
Ian Lance Taylor
d00210f519 Match gccgo error messages.
bug249.go:10:5: error: incompatible type in initialization
bug249.go:26:5: error: incompatible type in initialization

R=rsc
CC=golang-dev
https://golang.org/cl/198058
2010-02-01 23:27:33 -08:00
Russ Cox
674458e1c4 gc: bug246
R=ken2
CC=golang-dev
https://golang.org/cl/198057
2010-02-01 23:05:15 -08:00
Russ Cox
0bd41e2ff0 gc: bug242
R=ken2
CC=golang-dev
https://golang.org/cl/198053
2010-02-01 22:18:51 -08:00
Ian Lance Taylor
9a65381b77 Fix for gccgo, which uses a package prefix.
R=rsc
CC=golang-dev
https://golang.org/cl/198046
2010-02-01 16:26:50 -08:00
Ian Lance Taylor
001d9917f4 Match gccgo error messages.
I have to admit that "cannot use type p.T as type p.T" is a
bit weak.  8g gives a similar error ("cannot use v1 (type p.T)
as type p.T in assignment").

bug3.go:37:5: error: incompatible type in initialization (incompatible type for method ‘M’ (different parameter types))
bug3.go:38:5: error: incompatible type in initialization (incompatible type for method ‘M’ (different parameter types))
bug3.go:43:5: error: incompatible type in initialization (incompatible type for method ‘M’ (different parameter types))
bug3.go:44:5: error: incompatible type in initialization (incompatible type for method ‘M’ (different parameter types))
bug3.go:49:5: error: incompatible types in assignment (cannot use type p.T as type p.T)
bug3.go:50:5: error: incompatible types in assignment (cannot use type p.T as type p.T)
bug3.go:55:5: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))
bug3.go:56:5: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))
bug3.go:57:6: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))
bug3.go:58:6: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))
bug3.go:59:5: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))
bug3.go:60:5: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))
bug3.go:61:6: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))
bug3.go:62:6: error: incompatible types in assignment (incompatible type for method ‘M’ (different parameter types))

R=rsc
CC=golang-dev
https://golang.org/cl/199044
2010-02-01 16:25:55 -08:00
Ian Lance Taylor
a91e524bc1 Match gccgo error messages.
bug238.go:11:7: error: invalid constant type
bug238.go:12:7: error: invalid constant type
bug238.go:13:7: error: invalid constant type
bug238.go:14:7: error: invalid constant type
bug238.go:15:7: error: invalid constant type
bug238.go:16:7: error: invalid constant type
bug238.go:17:7: error: invalid constant type

R=rsc
CC=golang-dev
https://golang.org/cl/194159
2010-01-30 11:38:06 -08:00
Ian Lance Taylor
f4d714ca2d Match gccgo error message.
bug231.go:20:4: error: incompatible types in assignment (type has no methods)

R=rsc
CC=golang-dev
https://golang.org/cl/194156
2010-01-30 11:31:06 -08:00
Ian Lance Taylor
5163d50c7d Recognize gccgo error messages.
bug228.go:11:25: error: invalid use of ‘...’
bug228.go:13:13: error: ‘...’ only permits one name
bug228.go:15:20: error: ‘...’ must be last parameter
bug228.go:17:7: error: expected type
bug228.go:19:8: error: expected type

R=rsc
CC=golang-dev
https://golang.org/cl/196077
2010-01-29 22:38:39 -08:00
Russ Cox
7abb4b3a96 gc: fix chan <- chan precedence.
also allow func() func().

R=ken2
CC=golang-dev
https://golang.org/cl/194078
2010-01-26 10:40:28 -08:00
Russ Cox
1912632019 runtime, type switch: eliminate package global name space assumption
bonus: type switch now detects multiple uses of identical interface types.
bonus: interface types are now order-independent, following the spec.

R=ken2
CC=golang-dev
https://golang.org/cl/194053
2010-01-25 18:23:20 -08:00
Russ Cox
3b1a0355b6 5l, 6l, 8l: accept only one object file
(package main; others are pulled in automatically)

R=ken2
CC=golang-dev
https://golang.org/cl/194069
2010-01-25 17:53:43 -08:00
Russ Cox
d1b14a6fb0 gc: bug247, reported by rob
R=ken2
CC=golang-dev
https://golang.org/cl/194051
2010-01-24 22:42:18 -08:00
Russ Cox
fe01d4c8a1 gc: const debug bool = false
R=ken2
CC=golang-dev
https://golang.org/cl/186232
2010-01-19 15:25:44 -08:00
Russ Cox
ff6e310b00 gc: bug245
Fixes #529.

R=ken2
CC=golang-dev
https://golang.org/cl/186215
2010-01-18 17:30:15 -08:00
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