Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gtrias committed Sep 10, 2024
1 parent 006fd7f commit 63079f3
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions lib/runtime_generic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@
module RuntimeGeneric
extend T::Helpers
extend T::Sig
include T::Generic

# NOTE: This is needed in order to make tapioca compatible with RuntimeGeneric
def self.extended(base)
base.extend(T::Generic)
end
extend T::Generic

class TypedGeneric < T::Types::Simple
extend T::Sig
Expand Down Expand Up @@ -46,12 +41,11 @@ def inner_type

def [](inner_type)
RuntimeGeneric::TypedGeneric.new(self, inner_type)
super
end

def type_member(variance = :invariant, &blk)
super

# Calling supper to make it compatible with Tapioca
super.type_member(variance, &blk)
MyTypeMember.new(variance, &blk)
end
end

0 comments on commit 63079f3

Please sign in to comment.