@@ -1158,7 +1158,7 @@ static VALUE parse_type_params(parserstate *state, range *rg, bool module_type_p
11581158 rg -> start = state -> current_token .range .start ;
11591159
11601160 while (true) {
1161- bool unchecked = false ;
1161+ VALUE unchecked = Qfalse ;
11621162 VALUE variance = ID2SYM (rb_intern ("invariant" ));
11631163 VALUE upper_bound = Qnil ;
11641164 VALUE default_type = Qnil ;
@@ -1170,7 +1170,7 @@ static VALUE parse_type_params(parserstate *state, range *rg, bool module_type_p
11701170 range unchecked_range = NULL_RANGE ;
11711171 if (module_type_params ) {
11721172 if (state -> next_token .type == kUNCHECKED ) {
1173- unchecked = true ;
1173+ unchecked = Qtrue ;
11741174 parser_advance (state );
11751175 unchecked_range = state -> current_token .range ;
11761176 }
@@ -1245,11 +1245,7 @@ static VALUE parse_type_params(parserstate *state, range *rg, bool module_type_p
12451245 rbs_loc_add_optional_child (loc , INTERN ("upper_bound" ), upper_bound_range );
12461246 rbs_loc_add_optional_child (loc , INTERN ("default" ), default_type_range );
12471247
1248- VALUE param = rbs_ast_type_param (name , variance , upper_bound , default_type , location );
1249-
1250- if (unchecked ) {
1251- rb_funcall (param , rb_intern ("unchecked!" ), 0 );
1252- }
1248+ VALUE param = rbs_ast_type_param (name , variance , upper_bound , default_type , unchecked , location );
12531249
12541250 melt_array (& params );
12551251 rb_ary_push (params , param );
0 commit comments