- 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 GitHub
parent d965c9aa76
commit 31bd7cfc04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2480,6 +2480,12 @@ FxExpression *FxAssign::Resolve(FCompileContext &ctx)
delete this;
return nullptr;
}
else if (Base->IsDynamicArray())
{
ScriptPosition.Message(MSG_ERROR, "Cannot assign dymanic 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");