mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
fixup! Type inference draft.
This commit is contained in:
parent
6d43dfbd43
commit
ff06778fee
@ -54,11 +54,11 @@ TypeInference::TypeInference(Analysis& _analysis):
|
|||||||
);
|
);
|
||||||
if (auto error = std::get_if<std::string>(&result))
|
if (auto error = std::get_if<std::string>(&result))
|
||||||
solAssert(!error, *error);
|
solAssert(!error, *error);
|
||||||
TypeClass resultClass = std::get<TypeClass>(result);
|
TypeClass declaredClass = std::get<TypeClass>(result);
|
||||||
// TODO: validation?
|
// TODO: validation?
|
||||||
annotation().typeClassFunctions[resultClass] = _memberCreator(type);
|
annotation().typeClassFunctions[declaredClass] = _memberCreator(type);
|
||||||
solAssert(annotation().builtinClassesByName.emplace(_name, _class).second);
|
solAssert(annotation().builtinClassesByName.emplace(_name, _class).second);
|
||||||
return annotation().builtinClasses.emplace(_class, resultClass).first->second;
|
return annotation().builtinClasses.emplace(_class, declaredClass).first->second;
|
||||||
};
|
};
|
||||||
TypeSystemHelpers helper{m_typeSystem};
|
TypeSystemHelpers helper{m_typeSystem};
|
||||||
using MemberList = std::map<std::string, Type>;
|
using MemberList = std::map<std::string, Type>;
|
||||||
|
Loading…
Reference in New Issue
Block a user