You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
<code>
package foo
import (
)
func StrArray() []string {
if true {
return make([]string, 3)
} else {
return nil
}
}
</code>
$ 6g foo.go
foo.go:6: function ends without a return statement
What is the expected output?
Should compile. The following code compiles just fine:
<code>
package foo
import (
)
func StrArray() []string {
if true {
return make([]string, 3)
}
return nil
}
</code>
What do you see instead?
Compilation failed
Which compiler are you using (5g, 6g, 8g, gccgo)?
6g
Which operating system are you using?
linux
Which revision are you using? (hg identify)
$ hg identify
13ec466f6670 tip
The text was updated successfully, but these errors were encountered:
by [email protected]:
The text was updated successfully, but these errors were encountered: