Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/gopls: autocompletion stops working in certain cases #33098

Closed
vincepri opened this issue Jul 13, 2019 · 2 comments
Closed

x/tools/gopls: autocompletion stops working in certain cases #33098

vincepri opened this issue Jul 13, 2019 · 2 comments
Labels
Milestone

Comments

@vincepri
Copy link

@vincepri vincepri commented Jul 13, 2019

Working with gopls@master, it seems that in certain cases autocompletion stops working. In particular, variables returned from other methods or functions don't trigger completion properly.

Example:

package main

import (
	"fmt"
	"sync"
)

func main() {
	localMap := sync.Map{}
	m := getSyncMap()

	// Try to complete `m` and `localMap` before this if condition:
	// `m._` fails with expected selector or type assertion, found 'if' (and 1 more errors);
	// `localMap._` works;
	if true {
		fmt.Println("true")
	}
}

func getSyncMap() sync.Map {
	return sync.Map{}
}
@gopherbot gopherbot added this to the Unreleased milestone Jul 13, 2019
@gopherbot gopherbot added the gopls label Jul 13, 2019
@vincepri

This comment has been minimized.

Copy link
Author

@vincepri vincepri commented Jul 13, 2019

@stamblerre

This comment has been minimized.

Copy link
Contributor

@stamblerre stamblerre commented Jul 14, 2019

Duplicate of #31687

@stamblerre stamblerre closed this Jul 14, 2019
@stamblerre stamblerre marked this as a duplicate of #31687 Jul 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.