Runtime assertions for Ruby literal.fun
ruby
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 18 lines 346 B view raw
1# frozen_string_literal: true 2 3include Literal::Types 4 5test "===" do 6 Fixtures::Objects.each do |object| 7 refute _Never === object 8 end 9 10 refute _Never === nil 11end 12 13test "subtyping" do 14 assert_subtype _Never, Integer 15 assert_subtype _Never, _Union(Integer, String) 16 assert_subtype _Never, _Intersection(_Any?) 17 assert_subtype _Never, _Never 18end