-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
kind:bugA bug in the code. Does not apply to documentation, specs, etc.A bug in the code. Does not apply to documentation, specs, etc.topic:compiler:interpreter
Description
The interpreter fails to autocast a Pointer(UInt8) to Pointer(Void) while the compiler has no issues with it:
For example:
lib Foo
struct S
data : Pointer(Void)
end
end
s = Foo::S.new
s.data = Pointer(UInt8).null
p s
# => Foo::S(@data=Pointer(Void).null) 8 | s.data = Pointer(UInt8*).null
^---
Error: BUG: missing upcast_distinct from Pointer(UInt8) to Pointer(Void)
(Crystal::PointerInstanceType to Crystal::PointerInstanceType)
Add a 👍 reaction to issues you find important.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind:bugA bug in the code. Does not apply to documentation, specs, etc.A bug in the code. Does not apply to documentation, specs, etc.topic:compiler:interpreter