Skip to content

Commit

Permalink
TypeSystem::unify(): There should be no variables with same index but…
Browse files Browse the repository at this point in the history
… different sorts
  • Loading branch information
cameel committed Oct 30, 2023
1 parent 1a7a88a commit c2b701a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions libsolidity/experimental/ast/TypeSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ std::vector<TypeEnvironment::UnificationFailure> TypeEnvironment::unify(Type _a,
std::visit(util::GenericVisitor{
[&](TypeVariable _left, TypeVariable _right) {
if (_left.index() == _right.index())
{
if (_left.sort() != _right.sort())
unificationFailure();
}
solAssert(_left.sort() == _right.sort());
else
{
if (_left.sort() <= _right.sort())
Expand Down

0 comments on commit c2b701a

Please sign in to comment.