aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/error.go32
1 files changed, 30 insertions, 2 deletions
diff --git a/src/runtime/error.go b/src/runtime/error.go
index f5b015c091..eafcc9b173 100644
--- a/src/runtime/error.go
+++ b/src/runtime/error.go
@@ -74,8 +74,6 @@ func typestring(x interface{}) string {
// For calling from C.
// Prints an argument passed to panic.
-// There's room for arbitrary complexity here, but we keep it
-// simple and handle just a few important cases: int, string, and Stringer.
func printany(i interface{}) {
switch v := i.(type) {
case nil:
@@ -84,8 +82,38 @@ func printany(i interface{}) {
print(v.String())
case error:
print(v.Error())
+ case bool:
+ print(v)
case int:
print(v)
+ case int8:
+ print(v)
+ case int16:
+ print(v)
+ case int32:
+ print(v)
+ case int64:
+ print(v)
+ case uint:
+ print(v)
+ case uint8:
+ print(v)
+ case uint16:
+ print(v)
+ case uint32:
+ print(v)
+ case uint64:
+ print(v)
+ case uintptr:
+ print(v)
+ case float32:
+ print(v)
+ case float64:
+ print(v)
+ case complex64:
+ print(v)
+ case complex128:
+ print(v)
case string:
print(v)
default: