mirror of
https://github.com/luau-lang/luau.git
synced 2024-11-15 14:25:44 +08:00
transplant game engine fix for memory safety issues in normalization into OSS changes
This commit is contained in:
parent
0f1973954c
commit
5aa6d99340
@ -2631,6 +2631,9 @@ struct TypeChecker2
|
||||
for (const auto& [ty, _negations] : norm->classes.classes)
|
||||
{
|
||||
fetch(ty);
|
||||
|
||||
if (!normValid)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2644,9 +2647,16 @@ struct TypeChecker2
|
||||
fetch(builtinTypes->stringType);
|
||||
if (normValid)
|
||||
fetch(norm->threads);
|
||||
for (TypeId ty : norm->tables)
|
||||
if (normValid)
|
||||
{
|
||||
for (TypeId ty : norm->tables)
|
||||
{
|
||||
fetch(ty);
|
||||
|
||||
if (!normValid)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (normValid && norm->functions.isTop)
|
||||
fetch(builtinTypes->functionType);
|
||||
else if (normValid && !norm->functions.isNever())
|
||||
@ -2672,6 +2682,9 @@ struct TypeChecker2
|
||||
}
|
||||
else
|
||||
fetch(tyvar);
|
||||
|
||||
if (!normValid)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user