mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
tmp
This commit is contained in:
parent
58b7344c5a
commit
2e9b844d65
@ -104,12 +104,7 @@ private:
|
||||
GlobalAnnotation& annotation();
|
||||
|
||||
void unify(Type _a, Type _b, langutil::SourceLocation _location = {}, TypeEnvironment* _env = nullptr);
|
||||
enum class ExpressionContext
|
||||
{
|
||||
Term,
|
||||
Type,
|
||||
Sort
|
||||
};
|
||||
enum class ExpressionContext { Term, Type, Sort };
|
||||
Type handleIdentifierByReferencedDeclaration(langutil::SourceLocation _location, Declaration const& _declaration);
|
||||
ExpressionContext m_expressionContext = ExpressionContext::Term;
|
||||
};
|
||||
|
@ -289,15 +289,14 @@ std::string TypeEnvironmentHelpers::canonicalTypeName(Type _type) const
|
||||
};
|
||||
std::visit(util::GenericVisitor{
|
||||
[&](Declaration const* _declaration) {
|
||||
printTypeArguments();
|
||||
if (auto const* typeDeclarationAnnotation = dynamic_cast<TypeDeclarationAnnotation const*>(&_declaration->annotation()))
|
||||
stream << *typeDeclarationAnnotation->canonicalName;
|
||||
else
|
||||
// TODO: canonical name
|
||||
stream << _declaration->name();
|
||||
printTypeArguments();
|
||||
},
|
||||
[&](BuiltinType _builtinType) {
|
||||
printTypeArguments();
|
||||
switch(_builtinType)
|
||||
{
|
||||
case BuiltinType::Type:
|
||||
@ -331,6 +330,7 @@ std::string TypeEnvironmentHelpers::canonicalTypeName(Type _type) const
|
||||
stream << "integer";
|
||||
break;
|
||||
}
|
||||
printTypeArguments();
|
||||
}
|
||||
}, _type.constructor);
|
||||
return stream.str();
|
||||
|
@ -1822,12 +1822,12 @@ ASTPointer<TypeClassInstantiation> Parser::parseTypeClassInstantiation()
|
||||
expectToken(Token::Instantiation);
|
||||
// TODO: parseTypeConstructor()
|
||||
ASTPointer<TypeName> typeConstructor = parseTypeName();
|
||||
expectToken(Token::Colon);
|
||||
ASTPointer<ParameterList> argumentSorts;
|
||||
if (m_scanner->currentToken() == Token::LParen)
|
||||
{
|
||||
argumentSorts = parseParameterList();
|
||||
}
|
||||
expectToken(Token::Colon);
|
||||
ASTPointer<TypeClassName> typeClassName = parseTypeClassName();
|
||||
expectToken(Token::LBrace);
|
||||
while (true)
|
||||
|
Loading…
Reference in New Issue
Block a user