Skip to content

Commit f6e4355

Browse files
committed
Sema: Fix monthly TypeNullifier bug
This time, the issue is that TypeNullifier skips bodies of multi-statement closures. However, ExprRewriter will type happily pass them on to typeCheckClosureBody(). This could trigger assertions. Fix this by skipping type checking of multi-statement closures when diagnosing. There seems to be a minor QoI regression in some test cases that already looked pretty dodgy and/or had FIXMEs. However I think its worth fixing a crash.
1 parent 832a637 commit f6e4355

File tree

37 files changed

+81
-44
lines changed

37 files changed

+81
-44
lines changed

lib/Sema/CSApply.cpp

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ namespace {
295295
DeclContext *dc;
296296
const Solution &solution;
297297
bool SuppressDiagnostics;
298+
bool SkipClosures;
298299

299300
private:
300301
/// \brief Coerce the given tuple to another tuple type.
@@ -1468,9 +1469,10 @@ namespace {
14681469

14691470
public:
14701471
ExprRewriter(ConstraintSystem &cs, const Solution &solution,
1471-
bool suppressDiagnostics)
1472+
bool suppressDiagnostics, bool skipClosures)
14721473
: cs(cs), dc(cs.DC), solution(solution),
1473-
SuppressDiagnostics(suppressDiagnostics) { }
1474+
SuppressDiagnostics(suppressDiagnostics),
1475+
SkipClosures(skipClosures) { }
14741476

14751477
ConstraintSystem &getConstraintSystem() const { return cs; }
14761478

@@ -5646,6 +5648,11 @@ namespace {
56465648
ExprWalker(ExprRewriter &Rewriter) : Rewriter(Rewriter) { }
56475649

56485650
~ExprWalker() {
5651+
// If we're re-typechecking an expression for diagnostics, don't
5652+
// visit closures that have non-single expression bodies.
5653+
if (Rewriter.SkipClosures)
5654+
return;
5655+
56495656
auto &cs = Rewriter.getConstraintSystem();
56505657
auto &tc = cs.getTypeChecker();
56515658
for (auto *closure : closuresToTypeCheck)
@@ -6126,7 +6133,8 @@ bool ConstraintSystem::applySolutionFix(Expr *expr,
61266133
Expr *ConstraintSystem::applySolution(Solution &solution, Expr *expr,
61276134
Type convertType,
61286135
bool discardedExpr,
6129-
bool suppressDiagnostics) {
6136+
bool suppressDiagnostics,
6137+
bool skipClosures) {
61306138
// If any fixes needed to be applied to arrive at this solution, resolve
61316139
// them to specific expressions.
61326140
if (!solution.Fixes.empty()) {
@@ -6141,7 +6149,7 @@ Expr *ConstraintSystem::applySolution(Solution &solution, Expr *expr,
61416149
return nullptr;
61426150
}
61436151

6144-
ExprRewriter rewriter(*this, solution, suppressDiagnostics);
6152+
ExprRewriter rewriter(*this, solution, suppressDiagnostics, skipClosures);
61456153
ExprWalker walker(rewriter);
61466154

61476155
// Apply the solution to the expression.
@@ -6171,7 +6179,8 @@ Expr *ConstraintSystem::applySolution(Solution &solution, Expr *expr,
61716179
Expr *ConstraintSystem::applySolutionShallow(const Solution &solution,
61726180
Expr *expr,
61736181
bool suppressDiagnostics) {
6174-
ExprRewriter rewriter(*this, solution, suppressDiagnostics);
6182+
ExprRewriter rewriter(*this, solution, suppressDiagnostics,
6183+
/*skipClosures=*/false);
61756184
rewriter.walkToExprPre(expr);
61766185
Expr *result = rewriter.walkToExprPost(expr);
61776186
if (result)
@@ -6183,7 +6192,9 @@ Expr *Solution::coerceToType(Expr *expr, Type toType,
61836192
ConstraintLocator *locator,
61846193
bool ignoreTopLevelInjection) const {
61856194
auto &cs = getConstraintSystem();
6186-
ExprRewriter rewriter(cs, *this, /*suppressDiagnostics=*/false);
6195+
ExprRewriter rewriter(cs, *this,
6196+
/*suppressDiagnostics=*/false,
6197+
/*skipClosures=*/false);
61876198
Expr *result = rewriter.coerceToType(expr, toType, locator);
61886199
if (!result)
61896200
return nullptr;
@@ -6309,7 +6320,9 @@ Expr *TypeChecker::callWitness(Expr *base, DeclContext *dc,
63096320
}
63106321

63116322
Solution &solution = solutions.front();
6312-
ExprRewriter rewriter(cs, solution, /*suppressDiagnostics=*/false);
6323+
ExprRewriter rewriter(cs, solution,
6324+
/*suppressDiagnostics=*/false,
6325+
/*skipClosures=*/false);
63136326

63146327
auto memberRef = rewriter.buildMemberRef(base, openedFullType,
63156328
base->getStartLoc(),

lib/Sema/CSDiag.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2897,6 +2897,10 @@ typeCheckChildIndependently(Expr *subExpr, Type convertType,
28972897
// the context is missing).
28982898
TypeCheckExprOptions TCEOptions = TypeCheckExprFlags::DisableStructuralChecks;
28992899

2900+
// Don't walk into non-single expression closure bodies, because
2901+
// ExprTypeSaver and TypeNullifier skip them too.
2902+
TCEOptions |= TypeCheckExprFlags::SkipMultiStmtClosures;
2903+
29002904
// Claim that the result is discarded to preserve the lvalue type of
29012905
// the expression.
29022906
if (options.contains(TCC_AllowLValue))

lib/Sema/ConstraintSystem.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2368,9 +2368,14 @@ class ConstraintSystem {
23682368
///
23692369
/// \param convertType the contextual type to which the
23702370
/// expression should be converted, if any.
2371+
/// \param discardedExpr if true, the result of the expression
2372+
/// is contextually ignored.
2373+
/// \param skipClosures if true, don't descend into bodies of
2374+
/// non-single expression closures.
23712375
Expr *applySolution(Solution &solution, Expr *expr,
23722376
Type convertType, bool discardedExpr,
2373-
bool suppressDiagnostics);
2377+
bool suppressDiagnostics,
2378+
bool skipClosures);
23742379

23752380
/// \brief Apply a given solution to the expression to the top-level
23762381
/// expression, producing a fully type-checked expression.

lib/Sema/TypeCheckConstraints.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,8 +1188,9 @@ bool TypeChecker::typeCheckExpression(Expr *&expr, DeclContext *dc,
11881188
// Apply the solution to the expression.
11891189
auto &solution = viable[0];
11901190
bool isDiscarded = options.contains(TypeCheckExprFlags::IsDiscarded);
1191+
bool skipClosures = options.contains(TypeCheckExprFlags::SkipMultiStmtClosures);
11911192
auto result = cs.applySolution(solution, expr, convertType, isDiscarded,
1192-
suppressDiagnostics);
1193+
suppressDiagnostics, skipClosures);
11931194
if (!result) {
11941195
// Failure already diagnosed, above, as part of applying the solution.
11951196
return true;

lib/Sema/TypeChecker.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@ enum class TypeCheckExprFlags {
194194
/// statement. This should only be used for syntactic restrictions, and should
195195
/// not affect type checking itself.
196196
IsExprStmt = 0x20,
197+
198+
/// If set, this expression is being re-type checked as part of diagnostics,
199+
/// and so we should not visit bodies of non-single expression closures.
200+
SkipMultiStmtClosures = 0x40,
197201
};
198202

199203
typedef OptionSet<TypeCheckExprFlags> TypeCheckExprOptions;

test/Constraints/closures.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,14 @@ func r15998821() {
162162
var _: (Int,Int)-> Int = {$0+$1+$2} // expected-error {{contextual closure type '(Int, Int) -> Int' expects 2 arguments, but 3 were used in closure body}}
163163

164164

165+
// Crash when re-typechecking bodies of non-single expression closures
166+
167+
struct CC {}
168+
func callCC<U>(f: CC -> U) -> () {}
169+
170+
func typeCheckMultiStmtClosureCrash() {
171+
callCC { // expected-error {{cannot invoke 'callCC' with an argument list of type '((CC) -> _)'}}
172+
_ = $0 // expected-note@-1 {{expected an argument list of type '(CC -> U)'}}
173+
return 1
174+
}
175+
}

test/Constraints/diagnostics.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func rdar20142523() {
117117
map(0..<10, { x in // expected-error{{cannot invoke 'map' with an argument list of type '(Range<Int>, (_) -> _)'}}
118118
// expected-note @-1 {{overloads for 'map' exist with these partially matching parameter lists: (C, (C.Generator.Element) -> T), (T?, @noescape (T) -> U)}}
119119
()
120-
return x // expected-error {{type of expression is ambiguous without more context}}
120+
return x
121121
})
122122
}
123123

@@ -425,8 +425,7 @@ func f20371273() {
425425
// FIXME: Should complain about not having a return type annotation in the closure.
426426
[0].map { _ in let r = (1,2).0; return r }
427427
// expected-error @-1 {{cannot invoke 'map' with an argument list of type '(@noescape (Int) throws -> _)'}}
428-
// expected-error @-2 {{cannot convert return expression of type 'Int' to return type 'T'}}
429-
// expected-note @-3 {{expected an argument list of type '(@noescape Int throws -> T)'}}
428+
// expected-note @-2 {{expected an argument list of type '(@noescape Int throws -> T)'}}
430429

431430
// <rdar://problem/21078316> Less than useful error message when using map on optional dictionary type
432431
func rdar21078316() {

test/Constraints/patterns.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ func bad(a: A<EE>) {
212212
a.map { // expected-error {{cannot invoke 'map' with an argument list of type '((EE) -> _)'}}
213213
// expected-note@-1 {{expected an argument list of type '(EE -> T)'}}
214214
let _: EE = $0
215-
return 1 // expected-error {{cannot convert return expression of type 'Int' to return type 'T'}}
215+
return 1
216216
}
217217
}
218218

@@ -221,9 +221,9 @@ func ugly(a: A<EE>) {
221221
// expected-note@-1 {{expected an argument list of type '(EE -> T)'}}
222222
switch $0 {
223223
case .A:
224-
return 1 // expected-error {{cannot convert return expression of type 'Int' to return type 'T'}}
224+
return 1
225225
default:
226-
return 2 // expected-error {{cannot convert return expression of type 'Int' to return type 'T'}}
226+
return 2
227227
}
228228
}
229229
}

test/Constraints/subscript.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ let _ = 1["1"] // expected-error {{ambiguous use of 'subscript'}}
7474
// rdar://17687826 - QoI: error message when reducing to an untyped dictionary isn't helpful
7575
let squares = [ 1, 2, 3 ].reduce([:]) { (dict, n) in // expected-error {{cannot invoke 'reduce' with an argument list of type '([_ : _], @noescape (_, Int) throws -> _)'}}
7676
// expected-note @-1 {{expected an argument list of type '(T, combine: @noescape (T, Int) throws -> T)'}}
77-
var dict = dict // expected-error {{type of expression is ambiguous without more context}}
77+
var dict = dict
7878

7979
dict[n] = n * n
8080
return dict

test/stmt/statements.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ func test_is_as_patterns() {
403403
func matching_pattern_recursion() {
404404
switch 42 {
405405
case { // expected-error {{expression pattern of type '() -> ()' cannot match values of type 'Int'}}
406-
for i in zs { // expected-error {{use of unresolved identifier 'zs'}}
406+
for i in zs {
407407
}
408408
}: break
409409
}

validation-test/compiler_crashers/26963-checkenumrawvalues.swift renamed to validation-test/compiler_crashers_fixed/26963-checkenumrawvalues.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/26989-swift-typechecker-definedefaultconstructor.swift renamed to validation-test/compiler_crashers_fixed/26989-swift-typechecker-definedefaultconstructor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/27019-swift-genericfunctiontype-get.swift renamed to validation-test/compiler_crashers_fixed/27019-swift-genericfunctiontype-get.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/27024-swift-constraints-solution-simplifytype.swift renamed to validation-test/compiler_crashers_fixed/27024-swift-constraints-solution-simplifytype.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/27094-resolveidenttypecomponent.swift renamed to validation-test/compiler_crashers_fixed/27094-resolveidenttypecomponent.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/27098-swift-type-transform.swift renamed to validation-test/compiler_crashers_fixed/27098-swift-type-transform.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/27178-vtable.swift renamed to validation-test/compiler_crashers_fixed/27178-vtable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/27291-swift-modulefile-getdeclcontext.swift renamed to validation-test/compiler_crashers_fixed/27291-swift-modulefile-getdeclcontext.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/27298-swift-modulefile-gettype.swift renamed to validation-test/compiler_crashers_fixed/27298-swift-modulefile-gettype.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/27756-swift-modulefile-gettype.swift renamed to validation-test/compiler_crashers_fixed/27756-swift-modulefile-gettype.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/27827-swift-constraints-simplifylocator.swift renamed to validation-test/compiler_crashers_fixed/27827-swift-constraints-simplifylocator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/27870-swift-constraints-constraintsystem-optimizeconstraints.swift renamed to validation-test/compiler_crashers_fixed/27870-swift-constraints-constraintsystem-optimizeconstraints.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/27885-bool.swift renamed to validation-test/compiler_crashers_fixed/27885-bool.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/27925-swift-modulefile-loadextensions.swift renamed to validation-test/compiler_crashers_fixed/27925-swift-modulefile-loadextensions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/27930-swift-clangimporter-implementation-importattributes.swift renamed to validation-test/compiler_crashers_fixed/27930-swift-clangimporter-implementation-importattributes.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/27934-swift-genericsignature-getcanonical.swift renamed to validation-test/compiler_crashers_fixed/27934-swift-genericsignature-getcanonical.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/27980-matchcallarguments.swift renamed to validation-test/compiler_crashers_fixed/27980-matchcallarguments.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/28005-swift-constraints-constraintgraphnode-getadjacency.swift renamed to validation-test/compiler_crashers_fixed/28005-swift-constraints-constraintgraphnode-getadjacency.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/28087-swift-genericsignature-profile.swift renamed to validation-test/compiler_crashers_fixed/28087-swift-genericsignature-profile.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/28088-swift-nominaltypedecl-markinvalidgenericsignature.swift renamed to validation-test/compiler_crashers_fixed/28088-swift-nominaltypedecl-markinvalidgenericsignature.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/28097-swift-astprinter-printname.swift renamed to validation-test/compiler_crashers_fixed/28097-swift-astprinter-printname.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/28101-swift-constraints-constraint-create.swift renamed to validation-test/compiler_crashers_fixed/28101-swift-constraints-constraint-create.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/28149-addcurriedselftype.swift renamed to validation-test/compiler_crashers_fixed/28149-addcurriedselftype.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

validation-test/compiler_crashers/28154-swift-genericsignature-get.swift renamed to validation-test/compiler_crashers_fixed/28154-swift-genericsignature-get.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

0 commit comments

Comments
 (0)