Skip to content

Commit 942b71e

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

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
@@ -3417,7 +3417,7 @@ function expand_abstract_or_primitive_type(ctx, ex)
34173417
]
34183418
[K"=" name newtype_var]
34193419
[K"call" "_setsuper!"::K"core" newtype_var supertype]
3420-
[K"call" "_typebody!"::K"core" newtype_var]
3420+
[K"call" "_typebody!"::K"core" false::K"Bool" name]
34213421
]
34223422
]
34233423
[K"assert" "toplevel_only"::K"Symbol" [K"inert" ex] ]
@@ -3981,7 +3981,9 @@ function expand_struct_def(ctx, ex, docs)
39813981
]
39823982
[K"call"(type_body)
39833983
"_typebody!"::K"core"
3984-
struct_name
3984+
# TODO: if there is a previous compatible definition, re-use params. See #57253
3985+
false::K"Bool"
3986+
newtype_var
39853987
[K"call" "svec"::K"core" field_types...]
39863988
]
39873989
[K"const"

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)