We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01a0de2 commit 4bf682cCopy full SHA for 4bf682c
lib/Sema/TypeCheckCaptures.cpp
@@ -2,7 +2,7 @@
2
//
3
// This source file is part of the Swift.org open source project
4
5
-// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
6
// Licensed under Apache License v2.0 with Runtime Library Exception
7
8
// See https://swift.org/LICENSE.txt for license information
@@ -707,6 +707,9 @@ void TypeChecker::computeCaptures(AnyFunctionRef AFR) {
707
if (AFR.getCaptureInfo().hasBeenComputed())
708
return;
709
710
+ if (!AFR.getBody())
711
+ return;
712
+
713
SmallVector<CapturedValue, 4> Captures;
714
SourceLoc GenericParamCaptureLoc;
715
SourceLoc DynamicSelfCaptureLoc;
0 commit comments