Commit Graph

3 Commits

Author SHA1 Message Date
Russ Cox
565b5dc076 gc: new typechecking rules
* Code for assignment, conversions now mirrors spec.
* Changed some snprint -> smprint.
* Renamed runtime functions to separate
  interface conversions from type assertions:
  convT2I, assertI2T, etc.
* Correct checking of \U sequences.

Fixes #840.
Fixes #830.
Fixes #778.

R=ken2
CC=golang-dev
https://golang.org/cl/1303042
2010-06-08 18:50:02 -07:00
Ian Lance Taylor
fbba532fa0 gccgo does not distinguish "use" and "assign" in these error
messages.  Match gccgo output.

named1.go:32:2: error: argument 0 has wrong type (cannot use type bool as type Bool)
named1.go:33:2: error: argument 0 has wrong type (cannot use type bool as type Bool)
named1.go:35:5: error: incompatible type for map index (cannot use type bool as type Bool)
named1.go:36:12: error: incompatible type for map assignment (cannot use type Bool as type bool)
named1.go:38:5: error: incompatible types in assignment (cannot use type bool as type Bool)
named1.go:40:2: error: argument 0 has wrong type (cannot use type bool as type Bool)
named1.go:42:5: error: incompatible type for receive (cannot use type bool as type Bool)
named1.go:46:5: error: incompatible type for type guard (cannot use type bool as type Bool)
named1.go:50:5: error: incompatible type for type guard (cannot use type bool as type Bool)
named1.go:53:2: error: argument 0 has wrong type (cannot use type bool as type Bool)
named1.go:54:5: error: incompatible types in assignment (cannot use type bool as type Bool)

R=rsc
DELTA=4  (0 added, 0 deleted, 4 changed)
OCL=35943
CL=35943
2009-10-20 23:11:00 -07:00
Russ Cox
78ebe2b392 test: comparisons have type bool
R=r
DELTA=81  (57 added, 24 deleted, 0 changed)
OCL=34991
CL=34996
2009-09-24 17:54:47 -07:00