Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit ae5a54b

Browse files
Allow bridgeable optional foreign types to import correctly
1 parent 8e5aa5a commit ae5a54b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

libscript/src/script-execute.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,7 @@ MCScriptExecuteContext::ConvertToResolvedType(MCValueRef p_value,
538538
// don't try to export. This allows optional foreign slots to be set to
539539
// undefined when the type has no bridging type; without this, it is not
540540
// possible to set these slots to undefined!
541-
if (t_to_desc->doexport == nil &&
542-
p_to_type.is_optional &&
541+
if (p_to_type.is_optional &&
543542
p_value == kMCNull)
544543
{
545544
r_new_value = MCValueRetain(kMCNull);

0 commit comments

Comments
 (0)