fix: Invalid type in integer literal ast node on mac

This commit is contained in:
WerWolv 2021-04-21 10:37:14 +02:00
parent 32d47456de
commit ea71389982
1 changed files with 2 additions and 2 deletions

View File

@ -234,9 +234,9 @@ namespace hex::lang {
switch (typeOperatorNode->getOperator()) {
case Token::Operator::AddressOf:
return new ASTNodeIntegerLiteral({ Token::ValueType::Unsigned64Bit, pattern->getOffset() });
return new ASTNodeIntegerLiteral({ Token::ValueType::Unsigned64Bit, static_cast<u64>(pattern->getOffset()) });
case Token::Operator::SizeOf:
return new ASTNodeIntegerLiteral({ Token::ValueType::Unsigned64Bit, pattern->getSize() });
return new ASTNodeIntegerLiteral({ Token::ValueType::Unsigned64Bit, static_cast<u64>(pattern->getSize()) });
default:
this->getConsole().abortEvaluation("invalid type operator used. This is a bug!");
}