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
krzyzanowskim opened this issue
Nov 16, 2020
· 2 comments
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
Looks like this issue has been fixed on main, compiler would produce following diagnostic:
error: closure containing control flow statement cannot be used with result builder 'ViewBuilder'
guard let position = pos else {
^
SwiftUI.ViewBuilder:2:30: note: struct 'ViewBuilder' declared here
@resultBuilder public struct ViewBuilder {
^
@krzyzanowskim please use the most recent toolchain of main branch from swift.org to verify and close.
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
Environment
Apple Swift version 5.3.1 (swiftlang-1200.0.41 clang-1200.0.32.8)
Target: x86_64-apple-darwin20.1.0
Additional Detail from JIRA
md5: bb3d4d91848e0d25977be812815fd4d6
Issue Description:
The sample code below crashes the swiftc, but it should rather emit an error that the guard statement is not allowed here.
The text was updated successfully, but these errors were encountered: