[TMP] Remove polymorphicInstance() from class type member types

This commit is contained in:
Kamil Śliwak 2023-09-20 14:26:12 +02:00
parent bdd2f02c83
commit 201259d50b

View File

@ -216,8 +216,7 @@ bool TypeInference::visit(TypeClassDefinition const& _typeClassDefinition)
subNode->accept(*this); subNode->accept(*this);
auto const* functionDefinition = dynamic_cast<FunctionDefinition const*>(subNode.get()); auto const* functionDefinition = dynamic_cast<FunctionDefinition const*>(subNode.get());
solAssert(functionDefinition); solAssert(functionDefinition);
// TODO: need polymorphicInstance? auto functionType = typeAnnotation(*functionDefinition);
auto functionType = polymorphicInstance(typeAnnotation(*functionDefinition));
if (!functionTypes.emplace(functionDefinition->name(), functionType).second) if (!functionTypes.emplace(functionDefinition->name(), functionType).second)
m_errorReporter.fatalTypeError(3195_error, functionDefinition->location(), "Function in type class declared multiple times."); m_errorReporter.fatalTypeError(3195_error, functionDefinition->location(), "Function in type class declared multiple times.");
auto typeVars = TypeEnvironmentHelpers{*m_env}.typeVars(functionType); auto typeVars = TypeEnvironmentHelpers{*m_env}.typeVars(functionType);