Skip to content

Commit f205373

Browse files
authored
Merge pull request #6220 from rudkx/cs-typemap
2 parents ef94156 + 1139f87 commit f205373

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

lib/Sema/ConstraintSystem.h

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,16 +1392,10 @@ class ConstraintSystem {
13921392

13931393
/// Get the type for an expression.
13941394
Type getType(Expr *E) {
1395-
// FIXME: Ideally this would be enabled but there are currently
1396-
// cases where we ask for types that are not set.
1397-
1398-
// assert(ExprTypes.find(E) != ExprTypes.end() &&
1399-
// "Expected type to have been set!");
1400-
1401-
// FIXME: Temporary until all references to expression types are
1402-
// updated.
1403-
// return ExprTypes[E];
1404-
return E->getType();
1395+
assert(hasType(E) && "Expected type to have been set!");
1396+
assert(ExprTypes[E]->isEqual(E->getType()) &&
1397+
"Expected type in map to be the same type in expression!");
1398+
return ExprTypes[E];
14051399
}
14061400

14071401
/// Cache the type of the expression argument and return that same

0 commit comments

Comments
 (0)