Skip to content

6g: select case i = <-c for interface i does not compile #1172

@edsrzf

Description

@edsrzf
1. What is a short input program that triggers the error?
func main() {
    var i interface{} // if this is an int, this program compiles
    c := make(chan int)
    select {
    case i = <-c: // error on this line
    }
    _ = i
}

2. What is the full compiler output?
main.go:7: select assignment must have receive on right hand side

3. What version of the compiler are you using?  (Run it with the -V flag.)
6g version 6463+

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions