Matthew Dempsky
Matthew Dempsky
@go101 No, I commented on this issue as intended. Today, this code: var x [100]int func f() int { ... } x[i] = f() means: ti, tf := i, f()...
> More specifically, it tries to clarify that the addresses of the target values must be confirmed before executing the second phase. But that's not the case today, so it's...
Why `t1 := (*int)(nil)`? You can't just simplify `&*(*int)(nil)` to `(*int)(nil)`. The former nil panics, whereas the latter does not. Alternatively, consider this: ``` package main func main() { x...
Do I understand correctly that your proposal is now just: > The assignments performed during the carry-out phase don't affect the destination expression evaluation results confirmed in the first phase....
FWIW, Go 1.20 changed how go/types.Package.Imports works, due to the change to unified IR. Suppose: You import package P from export data. P imports A and B. B imports C....
@adonovan The list of imported packages is constructed here: https://cs.opensource.google/go/x/tools/+/master:internal/gcimporter/ureader_yes.go;drc=3cba5a847ff8ab8c232faf4e4310cb2939a835b4;l=265 And each returned package should already have SetImports (and flattenImports) called by time `r.pkg()` returns. In your scenario, are {a,b,c}...
@adonovan Hm, okay. My impression was the import map could be prepopulated by other invocations of the same importer, but not that users could prepopulate it themselves. That would certainly...
Note that even `x, y = e, f(&e)` is undefined as to whether `e` is evaluated before or after the `f(&e)` call. FWIW, cmd/compile already uses the same logic to...
According to https://github.com/golang/go/wiki/Deprecated, "An API feature should only be marked deprecated if its use is problematic in some way, not simply because something newer exists." I agree that reflect.{String,Slice}Header are...
@bcmills No, it looks like it's not included in `go test` by default: https://github.com/golang/go/blob/88a36c9e9a511ec6ad218633bce1e82f25e54d35/src/cmd/go/internal/test/test.go#L655