diff options
| author | Russ Cox <rsc@golang.org> | 2010-06-08 18:50:02 -0700 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2010-06-08 18:50:02 -0700 |
| commit | 0b814afd0a2fa1dded3eaf4d2f79b20438842955 (patch) | |
| tree | 19d1ab733d194831a2bf78d352fc92bb71e86f7a /test/interface/pointer.go | |
| parent | 11704e355aa8f39669a36fe56c01d17deab60658 (diff) | |
| download | golang-0b814afd0a2fa1dded3eaf4d2f79b20438842955.tar.gz | |
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 issue 840.
Fixes issue 830.
Fixes issue 778.
R=ken2
CC=golang-dev
http://codereview.appspot.com/1303042
Diffstat (limited to 'test/interface/pointer.go')
| -rw-r--r-- | test/interface/pointer.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/interface/pointer.go b/test/interface/pointer.go index be24952ff..e628b558e 100644 --- a/test/interface/pointer.go +++ b/test/interface/pointer.go @@ -9,28 +9,28 @@ package main type Inst interface { - Next() *Inst; + Next() *Inst } type Regexp struct { - code []Inst; - start Inst; + code []Inst + start Inst } type Start struct { - foo *Inst; + foo *Inst } func (start *Start) Next() *Inst { return nil } func AddInst(Inst) *Inst { - print("ok in addinst\n"); + print("ok in addinst\n") return nil } func main() { - print("call addinst\n"); - var x Inst = AddInst(new(Start)); // ERROR "illegal|incompatible|is not" - print("return from addinst\n"); + print("call addinst\n") + var x Inst = AddInst(new(Start)) // ERROR "pointer to interface" + print("return from addinst\n") } |
