Commit d6f15be6 authored by Rob Pike's avatar Rob Pike

fixes for funcs without returns

R=ken
OCL=15170
CL=15170
parent ff65872f
......@@ -144,9 +144,7 @@ func (b *BoolValue) Str() string {
if b.val {
return "true"
}
else {
return "false"
}
return "false"
}
func NewBoolValue(b bool, p *bool) *BoolValue {
......
......@@ -49,4 +49,5 @@ hypot(p, q float64) float64
q = q*r;
r = q/p;
}
panic("unreachable")
}
......@@ -62,4 +62,5 @@ pow(arg1,arg2 float64) float64
}
arg1 *= arg1;
}
panic("unreachable")
}
......@@ -70,7 +70,6 @@ const NoError = "No Error"
func (e *Error) String() string {
if e == nil {
return NoError
} else {
return e.s
}
return e.s
}
......@@ -382,7 +382,7 @@ func Monmul(U PS, n int) PS{
// Multiply by x
func Xmul(U PS) PS{
Monmul(U,1);
return Monmul(U,1);
}
func Rep(c *rat) PS{
......
......@@ -16,6 +16,7 @@ func Alloc(i int) int {
case 10:
return 10;
}
return 0
}
func main() {
......
......@@ -226,5 +226,8 @@ fixedbugs/bug073.go:9: illegal types for operand: RSH
=========== fixedbugs/bug081.go
fixedbugs/bug081.go:5: syntax error
=========== fixedbugs/bug086.go
fixedbugs/bug086.go:5: function ends without a return statement
=========== fixedbugs/bug091.go
fixedbugs/bug091.go:14: label exit not defined
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment