@@ -33,9 +33,11 @@ TEST_F(SemaTest, TestLookupAlwaysLooksThroughOptionalBase) {
33
33
auto *UMCRE = new (Context) UnresolvedMemberChainResultExpr (UME, UME);
34
34
35
35
ConstraintSystem cs (DC, ConstraintSystemOptions ());
36
- cs.generateConstraints (UMCRE, DC);
36
+ auto *expr = cs.generateConstraints (UMCRE, DC);
37
+ ASSERT_TRUE (expr);
38
+
37
39
cs.addConstraint (
38
- ConstraintKind::Conversion, cs.getType (UMCRE ), intOptType,
40
+ ConstraintKind::Conversion, cs.getType (expr ), intOptType,
39
41
cs.getConstraintLocator (UMCRE, ConstraintLocator::ContextualType));
40
42
SmallVector<Solution, 2 > solutions;
41
43
cs.solve (solutions);
@@ -67,10 +69,12 @@ TEST_F(SemaTest, TestLookupPrefersResultsOnOptionalRatherThanBase) {
67
69
auto *UMCRE = new (Context) UnresolvedMemberChainResultExpr (UME, UME);
68
70
69
71
ConstraintSystem cs (DC, ConstraintSystemOptions ());
70
- cs.generateConstraints (UMCRE, DC);
72
+ auto *expr = cs.generateConstraints (UMCRE, DC);
73
+ ASSERT_TRUE (expr);
74
+
71
75
cs.addConstraint (
72
- ConstraintKind::Conversion, cs.getType (UMCRE ), intOptType,
73
- cs.getConstraintLocator (UMCRE , ConstraintLocator::ContextualType));
76
+ ConstraintKind::Conversion, cs.getType (expr ), intOptType,
77
+ cs.getConstraintLocator (expr , ConstraintLocator::ContextualType));
74
78
SmallVector<Solution, 2 > solutions;
75
79
cs.solve (solutions);
76
80
0 commit comments