Skip to content

Commit b98e82c

Browse files
committed
bpart changes: Core._typebody! signature
`Core._typebody!` now takes a new "prev" argument, which we don't use yet here. Changes from JuliaLang/julia#57253
1 parent 3137331 commit b98e82c

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/closure_conversion.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ function convert_global_assignment(ctx, ex, var, rhs0)
147147
end
148148
push!(stmts, @ast ctx ex [K"=" var rhs])
149149
@ast ctx ex [K"block"
150+
[K"globaldecl" var]
150151
stmts...
151152
rhs1
152153
]

src/desugaring.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3410,7 +3410,7 @@ function expand_abstract_or_primitive_type(ctx, ex)
34103410
]
34113411
[K"=" name newtype_var]
34123412
[K"call" "_setsuper!"::K"core" newtype_var supertype]
3413-
[K"call" "_typebody!"::K"core" newtype_var]
3413+
[K"call" "_typebody!"::K"core" false::K"Bool" name]
34143414
]
34153415
]
34163416
[K"assert" "toplevel_only"::K"Symbol" [K"inert" ex] ]
@@ -3994,7 +3994,9 @@ function expand_struct_def(ctx, ex, docs)
39943994
]
39953995
[K"call"(type_body)
39963996
"_typebody!"::K"core"
3997-
struct_name
3997+
# TODO: if there is a previous compatible definition, re-use params. See #57253
3998+
false::K"Bool"
3999+
newtype_var
39984000
[K"call" "svec"::K"core" insert_struct_shim(ctx, field_types, struct_name)...]
39994001
]
40004002
[K"constdecl"

src/runtime.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ function eval_closure_type(mod, closure_type_name, field_names, field_is_box)
130130
length(field_names))
131131
Core._setsuper!(type, Core.Function)
132132
Base.eval(mod, :(const $closure_type_name = $type))
133-
Core._typebody!(type, Core.svec(field_types...))
133+
Core._typebody!(false, type, Core.svec(field_types...))
134134
type
135135
end
136136

0 commit comments

Comments
 (0)