@@ -179,7 +179,7 @@ def test_erase_with_type_object(self):
179
179
180
180
def test_erase_with_type_type (self ):
181
181
self .assert_erase (self .fx .type_a , self .fx .type_a )
182
- self .assert_erase (self .fx .type_t , TypeType ( self .fx .anyt ) )
182
+ self .assert_erase (self .fx .type_t , self .fx .type_any )
183
183
184
184
def assert_erase (self , orig , result ):
185
185
assert_equal (str (erase_type (orig )), str (result ))
@@ -497,11 +497,11 @@ def test_simple_type_objects(self):
497
497
498
498
def test_type_type (self ):
499
499
self .assert_join (self .fx .type_a , self .fx .type_b , self .fx .type_a )
500
- self .assert_join (self .fx .type_b , TypeType ( self .fx .anyt ), TypeType ( self .fx .anyt ) )
500
+ self .assert_join (self .fx .type_b , self .fx .type_any , self .fx .type_any )
501
501
self .assert_join (self .fx .type_b , self .fx .type_type , self .fx .type_type )
502
502
self .assert_join (self .fx .type_b , self .fx .type_c , self .fx .type_a )
503
503
self .assert_join (self .fx .type_c , self .fx .type_d , TypeType (self .fx .o ))
504
- self .assert_join (self .fx .type_type , TypeType ( self .fx .anyt ) , self .fx .type_type )
504
+ self .assert_join (self .fx .type_type , self .fx .type_any , self .fx .type_type )
505
505
self .assert_join (self .fx .type_b , self .fx .anyt , self .fx .anyt )
506
506
507
507
# There are additional test cases in check-inference.test.
@@ -691,13 +691,13 @@ def test_meet_interface_types(self):
691
691
self .assert_meet (self .fx .f , self .fx .f2 , self .fx .nonet )
692
692
self .assert_meet (self .fx .f , self .fx .f3 , self .fx .f3 )
693
693
694
- def test_join_interface_and_class_types (self ):
694
+ def test_meet_interface_and_class_types (self ):
695
695
self .assert_meet (self .fx .o , self .fx .f , self .fx .f )
696
696
self .assert_meet (self .fx .a , self .fx .f , self .fx .nonet )
697
697
698
698
self .assert_meet (self .fx .e , self .fx .f , self .fx .e )
699
699
700
- def test_join_class_types_with_shared_interfaces (self ):
700
+ def test_meet_class_types_with_shared_interfaces (self ):
701
701
# These have nothing special with respect to meets, unlike joins. These
702
702
# are for completeness only.
703
703
self .assert_meet (self .fx .e , self .fx .e2 , self .fx .nonet )
@@ -712,6 +712,15 @@ def test_meet_with_generic_interfaces(self):
712
712
self .assert_meet (fx .gfa , fx .gfa , fx .gfa )
713
713
self .assert_meet (fx .gfb , fx .m1 , fx .nonet )
714
714
715
+ def test_type_type (self ):
716
+ self .assert_meet (self .fx .type_a , self .fx .type_b , self .fx .type_b )
717
+ self .assert_meet (self .fx .type_b , self .fx .type_any , self .fx .type_b )
718
+ self .assert_meet (self .fx .type_b , self .fx .type_type , self .fx .type_b )
719
+ self .assert_meet (self .fx .type_b , self .fx .type_c , self .fx .nonet )
720
+ self .assert_meet (self .fx .type_c , self .fx .type_d , self .fx .nonet )
721
+ self .assert_meet (self .fx .type_type , self .fx .type_any , self .fx .type_any )
722
+ self .assert_meet (self .fx .type_b , self .fx .anyt , self .fx .type_b )
723
+
715
724
# FIX generic interfaces + ranges
716
725
717
726
def assert_meet (self , s , t , meet ):
0 commit comments