[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);
auto const* functionDefinition = dynamic_cast<FunctionDefinition const*>(subNode.get());
solAssert(functionDefinition);
// TODO: need polymorphicInstance?
auto functionType = polymorphicInstance(typeAnnotation(*functionDefinition));
auto functionType = typeAnnotation(*functionDefinition);
if (!functionTypes.emplace(functionDefinition->name(), functionType).second)
m_errorReporter.fatalTypeError(3195_error, functionDefinition->location(), "Function in type class declared multiple times.");
auto typeVars = TypeEnvironmentHelpers{*m_env}.typeVars(functionType);