Internal compiler error when explicitly instantiating Union
of types in same hierarchy
#11891
Labels
kind:bug
kind:regression
Something that used to correctly work but no longer works
topic:compiler:codegen
The following produces an internal compiler error since 1.2.0:
Foo | Bar
is okay. This is most likely a regression of #11188. The solution seems to be devirtualizing theGeneric
's type ID if it is exactlyUnion
; alternatively, it might involve copying this part:crystal/src/compiler/crystal/semantic/main_visitor.cr
Lines 208 to 219 in 3963244
to here:
crystal/src/compiler/crystal/semantic/bindings.cr
Lines 623 to 624 in 3963244
The text was updated successfully, but these errors were encountered: