Skip to content

Incorrect var/fn suggestions (GoConvey example) #2324

@oharlem

Description

@oharlem
package main func world() { println("world!") } func hello(what func()) { print("Hello ") what() } func main() { hello(wor<caret>) // this produces world() instead of world }

Original report

Hi,

When filling in an assertion with a GoConvey ( https://github.com/smartystreets/goconvey ), it gets an incorrect suggestion with a function instead of a variable (note the () after "ShouldEqual"):

So(actual, ShouldEqual(), expected)

Correct assertion would look like:

So(actual, ShouldEqual, expected)

The reason may be that a ShouldEqual var is treated as a function:

screen shot 2016-02-04 at 1 38 17 am

Not sure if should be submitted to GoConvey guys, as this may be related to a wider issue of what Go Idea Plugin should be suggesting - a var or a function behind it.

Please advise.

Thanks,
D.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions