cmd/compile: incorrect error for function conversion based on cyclic definition (esoteric) #25305
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
I'm only reporting this for future use should we ever get to a more thorough rethink of the type checker. This is a completely esoteric test case: https://play.golang.org/p/JjZZGCopERA
The error message is "cannot convert nil to type F" but F is clearly a function and thus nil can be converted into that function (of whatever type). The problem here is the type cycle; the conversion looks at a type that is not yet fully set up.
This example is primarily interesting as a test case.
The text was updated successfully, but these errors were encountered: