Check untyped const type coercion during decl
quasilyte opened this issue · 2 comments
quasilyte commented
func explicitLiteralType() {
var v1 int32 = 1
var v2 = int32(1)
}
quasilyte commented
I wonder if making this work for all var
decls is too invasive.
These 2 are always interchangeable:
var x = T(v)
var x T = v
quasilyte commented
It's probably the best option to limit all checks to some kind of "safe" set and include -pedantic
option that turns them into more complete versions that may be too much for some users (therefore it's going to be false
by default).