]> Cypherpunks repositories - gostls13.git/commitdiff
allow
authorRuss Cox <rsc@golang.org>
Fri, 26 Jun 2009 01:19:05 +0000 (18:19 -0700)
committerRuss Cox <rsc@golang.org>
Fri, 26 Jun 2009 01:19:05 +0000 (18:19 -0700)
package main
type t interface
type t interface{ m(map[t]bool) }
type m map[t] int

making it work without the forward declaration will require a second pass.

R=ken
OCL=30773
CL=30773

src/cmd/gc/subr.c

index 4f646fbc1e17ac43b190dcb0fa4859a3c1e8ea8e..9dfb445c637b4dc256d1b36ad45cc5cc63f87e64 100644 (file)
@@ -333,7 +333,7 @@ algtype(Type *t)
                a = ASTRING;    // string
        else if(isnilinter(t))
                a = ANILINTER;  // nil interface
-       else if(t->etype == TINTER)
+       else if(t->etype == TINTER || t->etype == TFORWINTER)
                a = AINTER;     // interface
        else
                a = ANOEQ;      // just bytes, but no hash/eq