From 0b814afd0a2fa1dded3eaf4d2f79b20438842955 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 8 Jun 2010 18:50:02 -0700 Subject: 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 --- test/interface/pointer.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test/interface/pointer.go') 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") } -- cgit v1.2.3