Skip to content

Commit

Permalink
nit: inline switch
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinav committed May 17, 2016
1 parent 26ce3ca commit 9f894c8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions compile/constant_value.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ func (c ConstantInt) Link(scope Scope, t TypeSpec) (ConstantValue, error) {
case DoubleSpec:
return ConstantDouble(float64(c)).Link(scope, t)
case BoolSpec:
v := int64(c)
switch v {
switch v := int64(c); v {
case 0, 1:
return ConstantBool(v == 1).Link(scope, t)
default:
Expand Down

0 comments on commit 9f894c8

Please sign in to comment.