Skip to content

Commit

Permalink
add missing []
Browse files Browse the repository at this point in the history
  • Loading branch information
gtrias committed Sep 10, 2024
1 parent 89110e6 commit e2852a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/runtime_generic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ module RuntimeGeneric
extend T::Sig
include T::Generic

def [](inner_type)
T::Types::Simple.new(inner_type)
end

def type_member(variance = :invariant, &blk)
# `T::Generic#type_member` just instantiates a `T::Type::TypeMember` instance and returns it.
# We use that when registering the type member and then later return it from this method.
Expand Down

0 comments on commit e2852a7

Please sign in to comment.