You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is that the default argument in localFunc "captures" the local variable counter. I'm not even sure if this should be allowed or should be a compile error, but the compiler should not crash. Removing the default argument or calling localFunc(counter) with an explicit argument fixes the crash.
Environment
Swift 4.2 from Xcode 10.0 beta 3.
macOS 10.13.5
Apple Swift version 4.2 (swiftlang-1000.0.25.1 clang-1000.10.28.1)
Target: x86_64-apple-darwin17.6.0
Additional Detail from JIRA
md5: fefd7d047e606e6914d050fd08467d94
duplicates:
Issue Description:
This code crashes the compiler:
The issue is that the default argument in
localFunc
"captures" the local variablecounter
. I'm not even sure if this should be allowed or should be a compile error, but the compiler should not crash. Removing the default argument or callinglocalFunc(counter)
with an explicit argument fixes the crash.This is the backtrace:
The text was updated successfully, but these errors were encountered: