-
-
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:codegen
Description
When using a lib type as generic argument, it seems that different types referencing the same base type are considered identical.
This would be expected for alias, but not for type where each definition is a distinct type.
lib LibFoo
type A = Void
type B = Void
end
class Bar(T)
def bar
T
end
end
Bar(LibFoo::A).new.bar # => LibFoo::A
Bar(LibFoo::B).new.bar # => LibFoo::AIn the interpreter it works fine (the second call returns LibFoo::A), so this looks like a codegen bug.
Originally discovered in #16686
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:codegen