Skip to content

Incorrect type of an argument that is a function with named return values #1869

@carmandrew

Description

@carmandrew

I think there's a problem when inferring the type of an argument that is a function with named return values.

For example, this shows no errors as expected:

func foo(fn func() error) { err := fn() err.Error() } 

However this shows an err on the err.Error() line:

func foo(fn func() (myErr error)) { err := fn() err.Error() } 

like so:
envelope_go_-_s0_-____code_s0_

Probably because it seems to think that err has the type func() (myErr error):
envelope_go_-_s0_-____code_s0_

Using intellij 14.1.4 and plugin version 0.9.485

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions