]> Cypherpunks repositories - gostls13.git/commitdiff
exp/ssa: silence go vet
authorRob Pike <r@golang.org>
Fri, 22 Feb 2013 21:02:00 +0000 (13:02 -0800)
committerRob Pike <r@golang.org>
Fri, 22 Feb 2013 21:02:00 +0000 (13:02 -0800)
R=adonovan
CC=golang-dev
https://golang.org/cl/7386052

src/pkg/exp/ssa/interp/interp.go
src/pkg/exp/ssa/interp/reflect.go
src/pkg/exp/ssa/literal.go

index c20ddb96224ef640bd59cc13050d472d88d15ff4..812420d073039e0acef9ca5fbe884a9cdb81171c 100644 (file)
@@ -586,7 +586,7 @@ func Interpret(mainpkg *ssa.Package, mode Mode, filename string, args []string)
                case string:
                        fmt.Fprintln(os.Stderr, "panic:", p)
                default:
-                       fmt.Fprintln(os.Stderr, "panic: unexpected type: %T", p)
+                       fmt.Fprintf(os.Stderr, "panic: unexpected type: %T\n", p)
                }
 
                // TODO(adonovan): dump panicking interpreter goroutine?
index 97b31118c737f4f8a3d601abadaef6fdae05c05f..26a8338126490f1248154eac3c578221b2be30cd 100644 (file)
@@ -233,7 +233,7 @@ func ext۰reflect۰Value۰Len(fn *ssa.Function, args []value) value {
        case map[value]value:
                return len(v)
        default:
-               panic(fmt.Sprintf("reflect.(Value).Len(%V)", v))
+               panic(fmt.Sprintf("reflect.(Value).Len(%v)", v))
        }
        return nil // unreachable
 }
index 6fb2cebe74ebd9b8290e91323ca6648a536a4ec0..32d2682f64ada32687c6e3f42e375352544ad37a 100644 (file)
@@ -9,7 +9,10 @@ import (
        "strconv"
 )
 
-var complexZero = types.Complex{new(big.Rat), new(big.Rat)}
+var complexZero = types.Complex{
+       Re: new(big.Rat),
+       Im: new(big.Rat),
+}
 
 // newLiteral returns a new literal of the specified value and type.
 // val must be valid according to the specification of Literal.Value.