Hacker News new | ask | show | jobs
by tinganho 734 days ago
Isn’t the channel variable declared and inferred as an int32? Can’t see why the overload isn’t resolved directly?
1 comments

The problem isn’t that the type inference can’t figure out that it’s a number (it can). Subtyping makes inference difficult. There may be a function somewhere which takes arguments that could be made to accept a string and an int32 (or whatever other number type that literal could be).