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
SR-2189 Nested function with local default value crashes
Issue Description:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: /Users/***/Library/Developer/Xcode/DerivedData/****-hfmagvhgn/Build/Intermediates/****.build/Debug-iphonesimulator/*****.build/Objects-normal/i386/****** (No such file or directory)
Compiler crash when a nested function uses as default value of one of the argument, a variable declared in the parent scope.
The crash happens only if the inner function is called with the default argument
This compilation issue (if real) should be highlighted as a real-time compilation issue instead of crashing at build time?
// This Works finevartestVariable: String {
letiWillMakeTheCompilerCrash: String = "the crashing variable"funcinnerFunctionWithDefaultArgument(iCrashOnCompilation: String = "") { } innerFunctionWithDefaultArgument() return ""
}
// This will crash due to the default variablevartestVariable: String {
letiWillMakeTheCompilerCrash: String = "the crashing variable"funcinnerFunctionWithDefaultArgument(iCrashOnCompilation: String = iWillMakeTheCompilerCrash) {
}
innerFunctionWithDefaultArgument()
return""
}
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: 46b8d567c431f8e667a5f73f5a685d81
duplicates:
Issue Description:
Compiler crash when a nested function uses as default value of one of the argument, a variable declared in the parent scope.
The crash happens only if the inner function is called with the default argument
This compilation issue (if real) should be highlighted as a real-time compilation issue instead of crashing at build time?
The text was updated successfully, but these errors were encountered: