- prohibit assignment of dynamic arrays

https://forum.zdoom.org/viewtopic.php?t=61682
This commit is contained in:
alexey.lysiuk 2018-08-18 15:20:38 +03:00 committed by drfrag666
parent 2ce7760e49
commit e84b360cb5

View file

@ -2488,6 +2488,12 @@ FxExpression *FxAssign::Resolve(FCompileContext &ctx)
delete this;
return nullptr;
}
else if (Base->IsDynamicArray())
{
ScriptPosition.Message(MSG_ERROR, "Cannot assign dynamic arrays, use Copy() or Move() function instead");
delete this;
return nullptr;
}
if (!Base->IsVector() && Base->ValueType->isStruct())
{
ScriptPosition.Message(MSG_ERROR, "Struct assignment not implemented yet");