diff --git a/liblangutil/Token.h b/liblangutil/Token.h index 741413a0b..fa967e7b0 100644 --- a/liblangutil/Token.h +++ b/liblangutil/Token.h @@ -273,7 +273,8 @@ namespace solidity::langutil K(Class, "class", 0) \ K(Instantiation, "instantiation", 0) \ K(Word, "word", 0) \ - K(Integer, "integer", 0) \ + K(IntegerType, "integer", 0) \ + K(Integer, "Integer", 0) \ K(Itself, "itself", 0) \ K(Void, "void", 0) \ K(Pair, "pair", 0) \ @@ -307,7 +308,7 @@ namespace TokenTraits constexpr bool isElementaryTypeName(Token tok) { return (Token::Int <= tok && tok < Token::TypesEnd) || - tok == Token::Word || tok == Token::Void || tok == Token::Integer || + tok == Token::Word || tok == Token::Void || tok == Token::IntegerType || tok == Token::Pair || tok == Token::Unit || tok == Token::Fun; } constexpr bool isAssignmentOp(Token tok) { return Token::Assign <= tok && tok <= Token::AssignMod; } diff --git a/libsolidity/experimental/analysis/TypeRegistration.cpp b/libsolidity/experimental/analysis/TypeRegistration.cpp index 1f6ff1ba0..6813e9151 100644 --- a/libsolidity/experimental/analysis/TypeRegistration.cpp +++ b/libsolidity/experimental/analysis/TypeRegistration.cpp @@ -73,7 +73,7 @@ bool TypeRegistration::visit(ElementaryTypeName const& _typeName) return m_typeSystem.constructor(PrimitiveType::Pair); case Token::Word: return m_typeSystem.constructor(PrimitiveType::Word); - case Token::Integer: + case Token::IntegerType: return m_typeSystem.constructor(PrimitiveType::Integer); case Token::Bool: return m_typeSystem.constructor(PrimitiveType::Bool); diff --git a/libsolidity/experimental/ast/TypeSystemHelper.cpp b/libsolidity/experimental/ast/TypeSystemHelper.cpp index d2280b181..2b4d379ad 100644 --- a/libsolidity/experimental/ast/TypeSystemHelper.cpp +++ b/libsolidity/experimental/ast/TypeSystemHelper.cpp @@ -66,7 +66,7 @@ std::optional experimental::typeConstructorFromToken(Analysis c return typeSystem.builtinConstructor(BuiltinType::Pair); case Token::Word: return typeSystem.builtinConstructor(BuiltinType::Word); - case Token::Integer: + case Token::IntegerType: return typeSystem.builtinConstructor(BuiltinType::Integer); case Token::Bool: return typeSystem.builtinConstructor(BuiltinType::Bool); diff --git a/test/libsolidity/semanticTests/experimental/stub.sol b/test/libsolidity/semanticTests/experimental/stub.sol index 5ec9c5d1e..d59a24994 100644 --- a/test/libsolidity/semanticTests/experimental/stub.sol +++ b/test/libsolidity/semanticTests/experimental/stub.sol @@ -34,7 +34,7 @@ instantiation word: * { } } -instantiation word: integer { +instantiation word: Integer { function fromInteger(x:integer) -> word { //x + x; }