Skip to content

Commit 43fff74

Browse files
committed
---
yaml --- r: 349436 b: refs/heads/master-next c: ee7ccfd h: refs/heads/master
1 parent 3895644 commit 43fff74

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 3574c513bbc5578dd9346b4ea9ab5995c5927bb5
3-
refs/heads/master-next: 1e5908b47bf540664e07b867aa8b002fee439576
3+
refs/heads/master-next: ee7ccfd9f3385000c8aae727e2f8c4d15fc3de61
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
66
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07

branches/master-next/lib/Sema/TypeCheckDecl.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3413,8 +3413,10 @@ IsImplicitlyUnwrappedOptionalRequest::evaluate(Evaluator &evaluator,
34133413
}
34143414

34153415
// If the parameter is not the 'newValue' parameter to a setter, it
3416-
// must be a subscript index parameter.
3417-
auto *subscript = cast<SubscriptDecl>(storage);
3416+
// must be a subscript index parameter (or we have an invalid AST).
3417+
auto *subscript = dyn_cast<SubscriptDecl>(storage);
3418+
if (!subscript)
3419+
return false;
34183420
auto *subscriptParams = subscript->getIndices();
34193421

34203422
auto where = llvm::find_if(*accessorParams,

0 commit comments

Comments
 (0)