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?
1. file: "main.go" :
package main
import "fmt";
type doer interface { do(); }
type Doer struct { do func(); }
func main()
{
d := Doer{ func(){ fmt.Println("Done"); } };
_ = doer(d);
}
2. compile with command: $ 8g main.go
What is the expected output? What do you see instead?
compile fails with output "Segmentation fault"
expected: either conversion is valid or isn't (preferably is ;) )
What is your $GOOS? $GOARCH?
$GOOS : linux
$GOARCH : 386
Which revision are you using? (hg identify)
4d7f5eddd695 tip
(was also present in release)
Please provide any additional information below.
For:
var d struct { do func(); };
d.do = func(){
fmt.Println("Done");
};
_ = doer(d);
compiler returns:
"struct { do func() } is not doer
missing do()"
Attachments:
The text was updated successfully, but these errors were encountered: