Merge pull request #19129 from vnen/positive-fix

Fix positive operator in GDScript compiler
This commit is contained in:
Max Hilbrunner 2018-05-23 23:07:24 +02:00 committed by GitHub
commit 34e9e5ba37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -738,6 +738,9 @@ int GDScriptCompiler::_parse_expression(CodeGen &codegen, const GDScriptParser::
case GDScriptParser::OperatorNode::OP_NEG: {
if (!_create_unary_operator(codegen, on, Variant::OP_NEGATE, p_stack_level)) return -1;
} break;
case GDScriptParser::OperatorNode::OP_POS: {
if (!_create_unary_operator(codegen, on, Variant::OP_POSITIVE, p_stack_level)) return -1;
} break;
case GDScriptParser::OperatorNode::OP_NOT: {
if (!_create_unary_operator(codegen, on, Variant::OP_NOT, p_stack_level)) return -1;
} break;