Skip to content

Missing second variable in select statements.Β #431

Open
@nsf

Description

@nsf
package main

import "time"

func test() {
	t := time.NewTicker(time.Second)
	select {
	case foo, ok := <-t.C:
		#
	}
}

"ok" is not visible there. I consider it as low priority, because "ok" is always a boolean and has no members, so the chance that you actually need autocompletion for it is low. But might worth fixing it one day. Gocode has mechanisms for infering such types with a map indexing statement. Shouldn't be too hard to add this one as well.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions