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?
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
}
"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.