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
cmd/compile: internal compiler error: assigning XXX (type driver.Value) to parameter <S> (type interface {}) #50169
Comments
If you change func (n *noopScanner) Scan(src interface{}) error { to func (n *noopScanner) Scan(src any) error { the error disappears and the code compiles. A quick bisect points to 2580d0e ( /cc @rsc @griesemer |
cc @mdempsky |
A simpler reproducer
Also cc @danscales |
Changing the declaration above to type Value = any // <<< make Value an alias makes the bug go away. This looks like something is not properly working with |
It looks to me that we might miss a CONVNOP somewhere. Before walk the AST for the call looks like
The code expects the type of the argument ( Note that the example only fails when inlining is enabled. It doesn't fail if inlining is disabled. Same for the original example. However, when inlining is disabled, even it doesn't ICE, the code tries to compare |
Change https://golang.org/cl/372217 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes (latest beta release + tip on go.dev/play)
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Received an internal compiler error running go 1.18 beta against an existing codebase.
The smallest repro code to cause this can be found at https://go.dev/play/p/lrcypQGydEi?v=gotip , where the compiler error is also evident.
What did you expect to see?
Successful compilation, works on 1.17 and earlier releases.
What did you see instead?
Internal compilation error, with request to file a bug report.
The text was updated successfully, but these errors were encountered: