1
0
mirror of https://github.com/golang/go synced 2024-09-24 15:30:13 -06:00
Commit Graph

193 Commits

Author SHA1 Message Date
Robert Griesemer
a85e06f302 bug: empty statement not properly recognized in conjunction w/ labels
R=r
DELTA=14  (14 added, 0 deleted, 0 changed)
OCL=24610
CL=24610
2009-02-06 16:45:37 -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
Russ Cox
391425ae55 if take address of local, move to heap.
heuristic to not print bogus strings.
fix one error message format.

R=ken
OCL=23849
CL=23851
2009-01-29 17:38:58 -08:00
Rob Pike
712522a6d8 bug135 is fixed
TBR=ken
OCL=23650
CL=23650
2009-01-27 19:30:44 -08:00
Rob Pike
fa615a3b30 f, ok := i.(Foo) does not compile if i already is equivalent to Foo
R=rsc
DELTA=18  (18 added, 0 deleted, 0 changed)
OCL=23544
CL=23547
2009-01-26 18:35:18 -08:00
Russ Cox
4efad58d0a bug133
R=ken
OCL=23528
CL=23528
2009-01-26 16:57:24 -08:00
Ian Lance Taylor
2a4f4dd842 Add a test for a case where 6g thinks that a field is visible
when it should not be.  I couldn't get this any simpler; the
error seems to have to do with the order of the imports in
bug2.go.

R=rsc
DELTA=26  (26 added, 0 deleted, 0 changed)
OCL=23450
CL=23482
2009-01-26 09:59:59 -08:00
Russ Cox
a7f6d4066e implement new restrictions on what
can be compared/hashed.

R=r
DELTA=351  (201 added, 80 deleted, 70 changed)
OCL=23423
CL=23481
2009-01-26 09:56:42 -08:00
Russ Cox
61590c4c44 disallow P.t for lowercase t and not our package P.
implement hiding lowercase methods m in
signatures by adding in a hash of the package name
to the type hash code.

remove remaining checks for internally-generated _ names:
they are all gone.

R=ken
OCL=23236
CL=23238
2009-01-21 14:51:57 -08:00
Robert Griesemer
41644d7138 - duplicate struct field not diagnosed
R=rsc
DELTA=16  (16 added, 0 deleted, 0 changed)
OCL=23224
CL=23229
2009-01-21 14:11:54 -08:00
Russ Cox
f48cbfdf56 convert tests; nothing interesting.
R=r
OCL=23012
CL=23014
2009-01-16 16:12:14 -08:00
Ian Lance Taylor
c0f6144f1b Test that a const with an explicit type is not treated as
having an abstract type.

R=gri
DELTA=11  (11 added, 0 deleted, 0 changed)
OCL=22829
CL=22832
2009-01-15 11:23:35 -08:00
Ian Lance Taylor
9414681972 Test that interfaces are correctly handled by pointer and by
value for large and small objects.  Currently one case fails
with 6g.

R=rsc
DELTA=150  (150 added, 0 deleted, 0 changed)
OCL=22823
CL=22827
2009-01-15 10:15:34 -08:00
Russ Cox
51c3ac7e3f bug046 and bug080 are fixed
R=r
DELTA=72  (30 added, 42 deleted, 0 changed)
OCL=22373
CL=22378
2009-01-08 20:06:37 -08:00
Russ Cox
5564504507 new new & make
R=r
OCL=22166
CL=22166
2009-01-06 15:19:02 -08:00
Rob Pike
315033368e bug020 is fixed
R=rsc
DELTA=40  (18 added, 22 deleted, 0 changed)
OCL=22134
CL=22139
2009-01-06 13:44:44 -08:00
Ian Lance Taylor
3f69acfb0c Test for a go statement which calls a method on an interface.
R=ken
DELTA=20  (20 added, 0 deleted, 0 changed)
OCL=21889
CL=21929
2008-12-30 15:03:46 -08:00
Russ Cox
e53d5ad620 fix type/name thing, again
R=r
DELTA=8  (7 added, 0 deleted, 1 changed)
OCL=21379
CL=21379
2008-12-16 17:45:28 -08:00
Rob Pike
0816debdfc update tests - 119 is fixed
R=gri
DELTA=62  (28 added, 34 deleted, 0 changed)
OCL=21269
CL=21271
2008-12-16 10:31:08 -08:00
Rob Pike
58a320f926 test update
R=rsc
DELTA=16  (5 added, 10 deleted, 1 changed)
OCL=21085
CL=21087
2008-12-12 13:29:25 -08:00
Russ Cox
889d9b6ffd bug129
package foo
import "syscall"
func f() {
	syscall := 1
}

R=ken
OCL=21036
CL=21036
2008-12-11 18:19:07 -08:00
Rob Pike
77fbc310e4 another bug cleanup.
R=rsc
DELTA=117  (54 added, 62 deleted, 1 changed)
OCL=20924
CL=20927
2008-12-10 14:59:43 -08:00
Rob Pike
fbfc9dddb2 update tests: nil is no longer integer-compatible
R=rsc
DELTA=56  (17 added, 32 deleted, 7 changed)
OCL=20876
CL=20916
2008-12-10 13:55:47 -08:00
Rob Pike
94a66489ed bug128 is fixed
R=rsc
DELTA=43  (19 added, 24 deleted, 0 changed)
OCL=20551
CL=20551
2008-12-04 20:51:47 -08:00
Russ Cox
dfa5893d4f preparation for exec.
* syscall:
	add syscall.RawSyscall, which doesn't use sys.entersyscall/sys.exitsyscall
	add syscall.dup2
	add syscall.BytePtrPtr
	add syscall.Rusage, RusagePtr
	add syscall.F_GETFD, F_SETFD, FD_CLOEXEC

* runtime:
	clean up, correct signal handling.
	can now survive (continue running after) a signal.

R=r
DELTA=394  (286 added, 51 deleted, 57 changed)
OCL=20351
CL=20369
2008-12-03 14:21:28 -08:00
Russ Cox
98431dbfff golden.out drift
TBR=r
OCL=20352
CL=20355
2008-12-03 13:05:56 -08:00
Robert Griesemer
4d76e8e142 - bug: empty switches don't compile
R=rsc
DELTA=32  (28 added, 3 deleted, 1 changed)
OCL=20301
CL=20340
2008-12-03 10:41:43 -08:00
Robert Griesemer
b0192ea1a5 bug: constants should not be redeclarable
R=rsc
DELTA=9  (9 added, 0 deleted, 0 changed)
OCL=20187
CL=20187
2008-12-01 17:27:57 -08:00
Rob Pike
60db3d6d3f don't print (incorrect anyway) line numbers in panic.
R=rsc
DELTA=4  (0 added, 2 deleted, 2 changed)
OCL=19757
CL=19763
2008-11-20 23:16:31 -08:00
Russ Cox
6cc001c312 return *os.Error instead of bool from strconv.ato*
R=r
DELTA=137  (56 added, 4 deleted, 77 changed)
OCL=19505
CL=19522
2008-11-18 17:12:07 -08:00
Robert Griesemer
6c5fc055c8 import syntax incorrect
R=r
OCL=19457
CL=19457
2008-11-18 09:39:34 -08:00
Russ Cox
c78005f648 update golden.out
R=r
OCL=19455
CL=19455
2008-11-18 09:35:42 -08:00
Ian Lance Taylor
d8ecead73d The compiler should reject calling a const as though it were a
function.  Also update golden.out.

R=r
DELTA=18  (18 added, 0 deleted, 0 changed)
OCL=19433
CL=19448
2008-11-18 06:25:21 -08:00
Russ Cox
a1585b676b fix the easy parts of bug120
R=r,ken
DELTA=66  (52 added, 3 deleted, 11 changed)
OCL=19386
CL=19389
2008-11-17 13:58:45 -08:00
Russ Cox
869c3f4cd0 update golden.out.
fix bug in run that was missing output.
make run warn about tests in bugs/ that succeed with no output
	(should be moved to fixedbugs/).

R=r
DELTA=21  (18 added, 0 deleted, 3 changed)
OCL=19381
CL=19381
2008-11-17 12:44:22 -08:00
Ian Lance Taylor
b1e8b5f5b7 The scope rules have been clarified to indicate that a
variable may only be named after the complete declaration,
including the initialization statements.

R=gri
DELTA=61  (16 added, 45 deleted, 0 changed)
OCL=19343
CL=19376
2008-11-17 12:19:02 -08:00
Ian Lance Taylor
7dee51f491 The compilers should and do permit interface types to list
multiple method names with a single type.

R=r,gri
DELTA=10  (0 added, 10 deleted, 0 changed)
OCL=19292
CL=19298
2008-11-14 17:28:17 -08:00
Ian Lance Taylor
c4d8dc0b83 This bug has been fixed; moving it from bugs to fixedbugs.
R=gri
DELTA=36  (18 added, 18 deleted, 0 changed)
OCL=19059
CL=19133
2008-11-12 21:59:43 -08:00
Ian Lance Taylor
a957ceec35 The scope rules have been changed to say that labels live in a
separate per-function namespace.

R=gri
DELTA=24  (8 added, 16 deleted, 0 changed)
OCL=19006
CL=19057
2008-11-11 18:17:54 -08:00
Rob Pike
203a17c6ec update tests
R=gri
DELTA=28  (12 added, 14 deleted, 2 changed)
OCL=18923
CL=18923
2008-11-10 14:59:15 -08:00
Ian Lance Taylor
9c7374d71b Erroneous test case. The break statement should break out of
a select clause.

R=ken
DELTA=20  (0 added, 20 deleted, 0 changed)
OCL=18731
CL=18739
2008-11-06 17:39:48 -08:00
Ian Lance Taylor
ce15158502 Test that a break statement inside a select statement breaks
out of the enclosing loop.

R=ken
DELTA=20  (20 added, 0 deleted, 0 changed)
OCL=18686
CL=18714
2008-11-06 15:24:10 -08:00
Ian Lance Taylor
48d111f0b9 6g dumps core on this input file.
R=ken,rsc
DELTA=14  (14 added, 0 deleted, 0 changed)
OCL=18555
CL=18598
2008-11-05 15:27:40 -08:00
Ian Lance Taylor
7fe34ea002 Fix powser1.go to compile with the current 6g, which doesn't
recognize methods for a variable whose type is a named type
which is a pointer type.  Add bug117 to test this case.

R=r
DELTA=24  (22 added, 0 deleted, 2 changed)
OCL=18547
CL=18554
2008-11-05 12:06:48 -08:00
Rob Pike
02f718339b update golden.out
R=rsc
OCL=18482
CL=18484
2008-11-04 14:33:47 -08:00
Russ Cox
d289e6344f move invalid method uses to new test
R=iant
DELTA=24  (13 added, 10 deleted, 1 changed)
OCL=18424
CL=18439
2008-11-04 09:45:27 -08:00
Russ Cox
c249a8de32 rename various magic names.
sigi and sigt:
	sys·sigi_inter -> sigi·inter
	sys·sigt_int -> sigt·int
	Package·sigt_Type -> sigt·Package.Type

	local type T in file x.go T_x -> T·x
	second one T_x_1 -> T·x·1

	method names M on T  T_M -> T·M

correctly handle local embedded types

init functions are the only place left that use underscores

R=ken
OCL=18377
CL=18377
2008-11-03 15:36:08 -08:00
Rob Pike
c1198b9b87 update tests
R=rsc
DELTA=159  (65 added, 84 deleted, 10 changed)
OCL=18149
CL=18151
2008-10-30 13:26:57 -07:00