mirror of
https://github.com/golang/go
synced 2024-11-12 09:50:21 -07:00
exp/ssa: silence go vet
R=adonovan CC=golang-dev https://golang.org/cl/7386052
This commit is contained in:
parent
a48ed66447
commit
96f57186ba
@ -586,7 +586,7 @@ func Interpret(mainpkg *ssa.Package, mode Mode, filename string, args []string)
|
|||||||
case string:
|
case string:
|
||||||
fmt.Fprintln(os.Stderr, "panic:", p)
|
fmt.Fprintln(os.Stderr, "panic:", p)
|
||||||
default:
|
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?
|
// TODO(adonovan): dump panicking interpreter goroutine?
|
||||||
|
@ -233,7 +233,7 @@ func ext۰reflect۰Value۰Len(fn *ssa.Function, args []value) value {
|
|||||||
case map[value]value:
|
case map[value]value:
|
||||||
return len(v)
|
return len(v)
|
||||||
default:
|
default:
|
||||||
panic(fmt.Sprintf("reflect.(Value).Len(%V)", v))
|
panic(fmt.Sprintf("reflect.(Value).Len(%v)", v))
|
||||||
}
|
}
|
||||||
return nil // unreachable
|
return nil // unreachable
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,10 @@ import (
|
|||||||
"strconv"
|
"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.
|
// newLiteral returns a new literal of the specified value and type.
|
||||||
// val must be valid according to the specification of Literal.Value.
|
// val must be valid according to the specification of Literal.Value.
|
||||||
|
Loading…
Reference in New Issue
Block a user