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
Apple Swift version 4.2 (swiftlang-1000.11.37.1 clang-1000.11.45.1)
Additional Detail from JIRA
Votes
0
Component/s
LLDB for Swift
Labels
Bug
Assignee
None
Priority
Medium
md5: e14913509b81209ac40e8596206668dc
Issue Description:
Xcode playground shows the expected warning/error:
functest1() {
do {
tryprint("foo") // ⚠️ No calls to throwing functions occur within 'try' expression
} catch { // ⚠️ 'catch' block is unreachable because no errors are thrown in 'do' blockfatalError()
}
}
functest2() throws {
tryprint("foo") // ⚠️ No calls to throwing functions occur within 'try' expression
}
trytest1() // ⚠️ No calls to throwing functions occur within 'try' expressiontest2() // ⛔️ Call can throw but is not marked with 'try'
REPL doesn't show any warning/error for the above code.
Environment
Apple Swift version 4.2 (swiftlang-1000.11.37.1 clang-1000.11.45.1)
Additional Detail from JIRA
md5: e14913509b81209ac40e8596206668dc
Issue Description:
Xcode playground shows the expected warning/error:
REPL doesn't show any warning/error for the above code.
https://forums.swift.org/t/discussion-try-for-function-that-does-not-throw/3328
The text was updated successfully, but these errors were encountered: