Skip to content

Commit 59f912a

Browse files
committed
Speculatively change PlaygroundTransform to stop using FreeTypeVariableBinding::GenericParameters,
there are two possible situations here: 1) This code never runs on invalid code, in which case this argument does nothing. 2) This code does run on invalid code, and the type checker would crash as TypeCheckExpr attempted to apply the solution. This causes no regressions on the playground logger testsuite, but I'm not really confident in this so I'll chat with Sean. Swift SVN r30182
1 parent 29b4948 commit 59f912a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/Sema/PlaygroundTransform.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,6 @@ class Instrumenter {
448448
};
449449

450450
class ErrorFinder : public ASTWalker {
451-
private:
452451
bool error = false;
453452
public:
454453
ErrorFinder () { }
@@ -479,9 +478,7 @@ class Instrumenter {
479478
ErrorGatherer errorGatherer(diags);
480479

481480
TypeChecker TC(Ctx, diags);
482-
TC.typeCheckExpression(*parsedExpr, DC, Type(), Type(),
483-
TypeCheckExprOptions(),
484-
FreeTypeVariableBinding::GenericParameters);
481+
TC.typeCheckExpression(*parsedExpr, DC);
485482

486483
if (*parsedExpr) {
487484
ErrorFinder errorFinder;

0 commit comments

Comments
 (0)