- Notifications
You must be signed in to change notification settings - Fork 567
Closed
Description
Resolving seems to be broken for the following code:
package main import "net" func main() { clientList := make(map[int]struct{ message chan string conn *net.Conn }) message := "" for _, c := range clientList { select { case c.message <- message: // message (not c.message) resolves to clientList.message field definition instead of message := "" declaration default: (*c.conn).Close() // c is not resolved, change the code to c.conn.Close() and resolving will work } } }
code is here: http://pastebin.com/KHnQ1zJM
First screenshot you can see that it doesn't resolve the conn properly, yes it compiles and functions perfectly. Second shot (line 102) same problem except now it resolves client as a type? Compiles and works perfectly. If I change it to c like the first SS it also gives the same error. Yes my code has naming issues atm, tore up between long vs short not sure but anyways this is a resolving issue for sure.