]> Cypherpunks repositories - gostls13.git/commitdiff
- updated printing of chan types
authorRobert Griesemer <gri@golang.org>
Wed, 17 Sep 2008 21:26:01 +0000 (14:26 -0700)
committerRobert Griesemer <gri@golang.org>
Wed, 17 Sep 2008 21:26:01 +0000 (14:26 -0700)
R=r
OCL=15448
CL=15448

usr/gri/gosrc/printer.go

index bcd7edb6c39f56addcc6be87ce108aa23089045f..d0c5a08f2d262bf4fc70f1e5ecbcc1c33efa843a 100755 (executable)
@@ -238,14 +238,12 @@ func (P *Printer) PrintTypeStruct(typ *Globals.Type) {
                P.PrintType(typ.elt);
 
        case Type.CHANNEL:
-               print("chan");
                switch typ.flags {
-               case Type.SEND: print(" -<");
-               case Type.RECV: print(" <-");
-               case Type.SEND + Type.RECV:  // nothing to print
+               case Type.SEND: print("chan <- ");
+               case Type.RECV: print("<- chan ");
+               case Type.SEND + Type.RECV: print("chan ");
                default: panic("UNREACHABLE");
                }
-               print(" ");
                P.PrintType(typ.elt);
 
        case Type.FUNCTION: