1
0
mirror of https://github.com/golang/go synced 2024-11-12 07:40:23 -07:00
Commit Graph

159 Commits

Author SHA1 Message Date
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
Ian Lance Taylor
48e5110151 Tweak comments so that this test passes with gccgo.
bug126.go:7:7: error: redefinition of 'none'
bug126.go:6:7: note: previous definition of 'none' was here

R=gri
DELTA=3  (1 added, 0 deleted, 2 changed)
OCL=20563
CL=20723
2008-12-08 11:31:55 -08:00
Ian Lance Taylor
cc352e5c1c The DejaGNU testsuite harness used by the gccgo testsuite is
broken if you give it something which matches everything--the
.* swallows all the error messages.  Recognize some reasonable
error text directly.

R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=20564
CL=20595
2008-12-05 10:20:34 -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
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
Russ Cox
1e1a3c5054 6g gives no error on "0 != nil"
R=ken
OCL=20289
CL=20289
2008-12-02 16:35:00 -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
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
Ian Lance Taylor
d12c1b99c7 Add ERROR comment for errmsg to look for.
R=gri
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=19460
CL=19500
2008-11-18 15:58:43 -08:00
Robert Griesemer
6c5fc055c8 import syntax incorrect
R=r
OCL=19457
CL=19457
2008-11-18 09:39:34 -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
Ian Lance Taylor
1945cc4c3c The compiler should reject comparisons between ints and nil.
R=gri
DELTA=8  (8 added, 0 deleted, 0 changed)
OCL=19434
CL=19436
2008-11-17 21:44:05 -08:00
Robert Griesemer
7692a93173 - new() accepts too many arguments
R=r
OCL=19413
CL=19413
2008-11-17 16:46:56 -08:00
Robert Griesemer
d58cd7626e - interface methods must have full function type
R=r
OCL=19410
CL=19410
2008-11-17 16:37:13 -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
f333f4685c floating point constant errors in 6g
R=r
OCL=19379
CL=19379
2008-11-17 12:33:49 -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
Robert Griesemer
20b9bfb136 wrong code for array access
R=r
OCL=19107
CL=19109
2008-11-12 14:57:23 -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
Russ Cox
56a7895386 fixed tests
R=r
DELTA=124  (62 added, 62 deleted, 0 changed)
OCL=18389
CL=18394
2008-11-03 15:52:34 -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
Russ Cox
cf9e46fec6 bugs from old gri mail
R=gri
OCL=18093
CL=18093
2008-10-29 19:34:47 -07:00
Ian Lance Taylor
e76e9cfc33 Call the right function for int32 values.
R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=18073
CL=18073
2008-10-29 15:48:34 -07:00
Russ Cox
11a978adf5 shift bug in constant evaluator
R=ken
OCL=18031
CL=18031
2008-10-29 13:46:55 -07:00
Ian Lance Taylor
22a6747999 Per discussion earlier today with r and gri: when an interface
object has a value of type "int", it should not automatically
convert to type "int32".  That is, the type alias "int" should
be regarded as having been defined as though "type int int32"
appeared outside of the package, and as therefore being a
different type from "int32".

R=ken
DELTA=21  (20 added, 0 deleted, 1 changed)
OCL=17587
CL=17842
2008-10-24 22:40:32 -07:00
Rob Pike
4bcfffb761 update fixed bugs (and delete an irrelevant one)
R=rsc
DELTA=328  (158 added, 170 deleted, 0 changed)
OCL=17353
CL=17359
2008-10-17 11:48:51 -07:00
Rob Pike
13508ceabe bug is fixed
R=ken
OCL=17208
CL=17208
2008-10-15 11:49:34 -07:00
Rob Pike
151c0de8bc update bug list
R=ken
OCL=17169
CL=17169
2008-10-14 19:41:05 -07:00
Rob Pike
99c5b2ed4d 6g thinks a struct with one entry yields a composite that is a basic conversion
R=rsc
DELTA=12  (12 added, 0 deleted, 0 changed)
OCL=16989
CL=16998
2008-10-13 12:26:58 -07:00
Robert Griesemer
32d00e6cc6 - added missing ';' according to new rules
(no effect on the test, but now parseable)

R=r
OCL=16936
CL=16936
2008-10-10 16:18:01 -07:00
Russ Cox
e6cd1e445b remove uses of *T as an implicit forward declaration of T
R=gri,r
OCL=16648
CL=16652
2008-10-07 12:59:54 -07:00
Russ Cox
983f06bdb6 update code to follow new semicolon rules:
*  1. all statements and declarations are terminated by semicolons
 *  2. semicolons can be omitted at top level.
 *  3. semicolons can be omitted before and after the closing ) or }
 *	on a list of statements or declarations.

/home/rsc/bin/addsemi and then diff+tweak.

R=r,gri
OCL=16620
CL=16643
2008-10-07 12:31:31 -07:00
Russ Cox
74e2e087e2 change type names to go live at the name, so that
type T struct {
		next *T
	}

and

	type T *struct {
		next T
	}

are valid without needing forward declarations.

add "type T struct" syntax for forward struct declarations.

add "type T interface" syntax, but commented out
	(need to fix semicolons first)

R=ken
DELTA=452  (259 added, 115 deleted, 78 changed)
OCL=16580
CL=16584
2008-10-06 16:44:17 -07:00
Rob Pike
98c208ee1d bug026 and bug060 are fixed. update.
R=rsc
DELTA=87  (37 added, 50 deleted, 0 changed)
OCL=16498
CL=16507
2008-10-05 08:34:48 -07:00
Russ Cox
7766b12ead const bug, name bug - working on both
R=r
DELTA=43  (43 added, 0 deleted, 0 changed)
OCL=16468
CL=16475
2008-10-03 17:06:24 -07:00
Ian Lance Taylor
8d0ed065dc With the cleanup of method types, this test case is now
invalid.  The receiver type is not permitted to be a pointer
type.  Since 6g currently accepts it, this moves the test case
back to the bugs directory.

R=gri
DELTA=22  (11 added, 11 deleted, 0 changed)
OCL=16284
CL=16336
2008-10-01 17:01:42 -07:00
Ian Lance Taylor
aadd32223d Test that floating point constants resolve to type "float".
Currently 6g seems to resolve them to type "double".

R=ken,r
DELTA=30  (30 added, 0 deleted, 0 changed)
OCL=16132
CL=16152
2008-09-29 18:17:42 -07:00
Russ Cox
785afb0847 make bugs not fail
R=r
DELTA=6  (0 added, 0 deleted, 6 changed)
OCL=16110
CL=16114
2008-09-29 13:16:22 -07:00
Ian Lance Taylor
08df4dcf7d Storing an out of range constant into a variable should
ideally cause the compiler to give an error.  Right now 6g
warns about large shifts but does not give an error.  This CL
removes the out of range shift from shift.go, so that it will
work with gccgo, and adds a test case in bugs/ to be fixed at
a later date.

R=ken,r
DELTA=23  (9 added, 14 deleted, 0 changed)
OCL=16085
CL=16088
2008-09-29 11:03:21 -07:00