Skip to content

Commit cfc566c

Browse files
committed
Undo the decision to publish incomplete types to the binding table
Part of JuliaLang/julia#56497. `insert-struct-shim` (for the a self-reference case) is omitted for now.
1 parent b7cefbc commit cfc566c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/desugaring.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3954,16 +3954,17 @@ function expand_struct_def(ctx, ex, docs)
39543954
]
39553955
end
39563956
]
3957-
# Otherwise do an assignment to trigger an error
3958-
[K"const" global_struct_name struct_name]
39593957
]
3960-
[K"const" global_struct_name struct_name]
39613958
]
39623959
[K"call"(type_body)
39633960
"_typebody!"::K"core"
39643961
struct_name
39653962
[K"call" "svec"::K"core" field_types...]
39663963
]
3964+
[K"const"
3965+
[K"globalref" struct_name]
3966+
struct_name
3967+
]
39673968
# Default constructors
39683969
if isempty(inner_defs)
39693970
default_inner_constructors(ctx, ex, global_struct_name,

0 commit comments

Comments
 (0)