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

162 Commits

Author SHA1 Message Date
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
Russ Cox
cf9e46fec6 bugs from old gri mail
R=gri
OCL=18093
CL=18093
2008-10-29 19:34:47 -07:00
Russ Cox
123bd8f24b more simple test fixes
R=r
OCL=18035
CL=18035
2008-10-29 14:09:48 -07:00
Russ Cox
915e809f86 update golden.out with new type names
R=r
OCL=18033
CL=18033
2008-10-29 14:05:00 -07:00
Rob Pike
5fcb035bca update golden.out
R=ken
OCL=17900
CL=17900
2008-10-27 11:08:01 -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
Russ Cox
689b28fd96 fix method function type compare bug (again)
R=ken
OCL=17819
CL=17819
2008-10-24 14:56:54 -07:00
Russ Cox
8d3a3dd904 update golden.out
R=iant
DELTA=4  (0 added, 0 deleted, 4 changed)
OCL=17680
CL=17711
2008-10-23 11:44:01 -07:00
Russ Cox
beee6915f8 rewrite &Point{1, 2} as allocation
R=ken
OCL=17592
CL=17592
2008-10-21 16:53:54 -07:00
Russ Cox
44b0ecc5ca 6g: use full type in sigt[0].name
sys: add sys.reflect
runtime: add canfail flag for later

R=ken
OCL=17583
CL=17583
2008-10-21 15:38:26 -07:00
Russ Cox
aacfbb461b 6g:
* print int as int, not P.int
	* write type info for non-exported types
	   in its own new section.

ar:
	skip over rest of line after $$

R=ken
OCL=17568
CL=17568
2008-10-21 14:34:45 -07:00
Russ Cox
5fe4cd83a8 do not set t->recur on basic types.
the comment talked about printing, but now
t->recur is only used for typehash.
in typehash it is important to compute different
hashes for the different basic types.

add test that makes sure an interface { X() int8 }
cannot be used as interface { X() int64 }

R=ken
OCL=17396
CL=17396
2008-10-17 17:51:29 -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
Russ Cox
925454e932 make sure errchk only says BUG once,
so that run's count is correct

R=iant,r
DELTA=20  (12 added, 0 deleted, 8 changed)
OCL=17329
CL=17342
2008-10-17 07:41:18 -07:00
Russ Cox
1163b1db6f diagnose various conversion problems
R=ken
OCL=17320
CL=17320
2008-10-16 15:59:31 -07:00
Rob Pike
151c0de8bc update bug list
R=ken
OCL=17169
CL=17169
2008-10-14 19:41:05 -07:00
Russ Cox
b4f8e01acb more interface checks:
- pointer to interface cannot have methods
	- record type names for better runtime error

R=r,ken
DELTA=85  (80 added, 0 deleted, 5 changed)
OCL=16658
CL=16722
2008-10-08 09:21:57 -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
717de79976 change in spec results in non-error
R=gri
DELTA=4  (0 added, 3 deleted, 1 changed)
OCL=16565
CL=16579
2008-10-06 16:27:14 -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
b8babed7c2 new import/export format
package flag
	export type flag.Flag struct { name flag.string; usage flag.string; \
		value flag.Value; next *flag.Flag }
	type flag.string string
	type flag.Value interface { AsBool () (? *flag.BoolValue); \
		AsInt () (? *flag.IntValue); AsString () (? *flag.StringValue); \
		IsBool () (? flag.bool); IsInt () (? flag.bool); IsString () (? flag.bool); \
		Str () (? flag.string); ValidValue (str flag.string) (? flag.bool) }
	type flag.BoolValue struct { val flag.bool; p *flag.bool }
	type flag.IntValue struct { val flag.int64; p *flag.int64 }
	type flag.StringValue struct { val flag.string; p *flag.string }
	type flag.bool bool
	func (e *flag.StringValue) AsBool () (? *flag.BoolValue)
	func (e *flag.StringValue) AsInt () (? *flag.IntValue)
	...

the \ continuations are for this message, not real.

changed delimiter for import from (( )) to $$ $$.

replaced mksys.bash with mksys.c

changed sys.go to use leading export,
	fake package name is now SYS not foop

don't always require ; on forward func decls

R=ken,r
DELTA=1827  (446 added, 1083 deleted, 298 changed)
OCL=16433
CL=16463
2008-10-03 16:15:55 -07:00
Russ Cox
77a911bcc1 update golden.out
R=r
OCL=16250
CL=16250
2008-09-30 15:45:49 -07:00
Rob Pike
ca6d4238a4 update golden for new error messages
R=rsc
OCL=16213
CL=16213
2008-09-30 13:07:38 -07:00
Rob Pike
fa2b4cbf44 104, 107, 108: they are known to fail, so mark them appropriately.
update golden
add the "goroutines" test

R=iant
DELTA=74  (36 added, 23 deleted, 15 changed)
OCL=16194
CL=16206
2008-09-30 12:31:47 -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
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
Ian Lance Taylor
6270e70b76 Add test case for 6g bug: result variable does not hide the
package name in the scope.

R=r
DELTA=12  (12 added, 0 deleted, 0 changed)
OCL=15913
CL=15926
2008-09-25 20:31:03 -07:00
Ian Lance Taylor
b70d42f323 6g currently accepts setting a string value to an integer
constant without an explicit conversion.  I think that is a
bug.  This adds a test case for it.

Also, change errchk to include the string BUG in error
messages, so that failures are included in the count reported
by the run shell script.

R=r,ken
DELTA=11  (7 added, 0 deleted, 4 changed)
OCL=15857
CL=15880
2008-09-25 15:08:52 -07:00
Russ Cox
173ca8a2d0 re-fix bug067, update golden.out
R=r
DELTA=9  (4 added, 3 deleted, 2 changed)
OCL=15655
CL=15655
2008-09-22 16:16:22 -07:00
Russ Cox
fb40f88c40 test cleanup
- do not print tracebacks if $GOTRACEBACK=0
	- set GOTRACEBACK=0 during tests
	- filter out pc numbers in errors

R=r
DELTA=70  (22 added, 30 deleted, 18 changed)
OCL=15618
CL=15642
2008-09-22 13:47:53 -07:00
Rob Pike
9ebd9d3b7d fix some tests
R=ken
OCL=15598
CL=15598
2008-09-20 15:16:48 -07:00
Ian Lance Taylor
66b261a082 Check for specific error messages in the testsuite. This
permits testing that the compiler emits error messages for
specific lines that match egrep regexps.  The desired error
messages are expressed using comments of the form
	// ERROR "regexp"

R=r
DELTA=90  (73 added, 8 deleted, 9 changed)
OCL=15513
CL=15566
2008-09-19 14:39:49 -07:00