fixes for funcs without returns

R=ken
OCL=15170
CL=15170
This commit is contained in:
Rob Pike 2008-09-11 15:48:42 -07:00
parent ff65872fbf
commit d6f15be61d
8 changed files with 9 additions and 6 deletions

View file

@ -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 {

View file

@ -49,4 +49,5 @@ hypot(p, q float64) float64
q = q*r;
r = q/p;
}
panic("unreachable")
}

View file

@ -62,4 +62,5 @@ pow(arg1,arg2 float64) float64
}
arg1 *= arg1;
}
panic("unreachable")
}

View file

@ -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
}

View file

@ -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{

View file

@ -16,6 +16,7 @@ func Alloc(i int) int {
case 10:
return 10;
}
return 0
}
func main() {

View file

@ -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