Commit f6f6b1c 1 parent 8b9da8d commit f6f6b1c Copy full SHA for f6f6b1c
File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -2204,6 +2204,7 @@ void jl_init_types(void) JL_GC_DISABLED
2204
2204
((jl_datatype_t * )jl_type_type )-> cached_by_hash = 0 ;
2205
2205
jl_type_typename -> wrapper = jl_new_struct (jl_unionall_type , tttvar , (jl_value_t * )jl_type_type );
2206
2206
jl_type_type = (jl_unionall_t * )jl_type_typename -> wrapper ;
2207
+ ((jl_datatype_t * )jl_type_type -> body )-> ismutationfree = 1 ;
2207
2208
2208
2209
jl_typeofbottom_type -> super = jl_wrap_Type (jl_bottom_type );
2209
2210
@@ -2807,7 +2808,6 @@ void jl_init_types(void) JL_GC_DISABLED
2807
2808
jl_symbol_type -> ismutationfree = jl_symbol_type -> isidentityfree = 1 ;
2808
2809
jl_simplevector_type -> ismutationfree = jl_simplevector_type -> isidentityfree = 1 ;
2809
2810
jl_datatype_type -> ismutationfree = 1 ;
2810
- ((jl_datatype_t * )jl_type_type -> body )-> ismutationfree = 1 ;
2811
2811
2812
2812
// Technically not ismutationfree, but there's a separate system to deal
2813
2813
// with mutations for global state.
Original file line number Diff line number Diff line change @@ -740,3 +740,6 @@ end |> !Core.Compiler.is_consistent
740
740
ImmutRef (x) = $ (Expr (:new , :(ImmutRef{typeof (x)}), :x ))
741
741
end
742
742
@test Core. Compiler. is_foldable (Base. infer_effects (ImmutRef, Tuple{Any}))
743
+
744
+ @test Base. ismutationfree (Type{Union{}})
745
+ @test Core. Compiler. is_total (Base. infer_effects (typejoin, ()))
You can’t perform that action at this time.
0 commit comments