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
importSwiftUIstructBugHereSomewhere: View {
varbody: someView {
#warning("#warning here is allowed")
VStack {
Text("Hello")
}
#warning("#warning here is not allowed!")
.ignoresSafeArea()
}
}
Swift (intentionally) doesn't have the C-preprocessor-like behavior of letting # directives go anywhere: #warning is a declaration, so it cannot be in the middle of a postfix-expression chain.
Environment
Xcode 12 beta 5
Additional Detail from JIRA
md5: c6d5bdb20609211fc2dcc36313ec96cb
Issue Description:
I think it should be allowed anywhere comment is allow. See https://forums.swift.org/t/why-warning-not-allowed-in-some-source-location/39643
The text was updated successfully, but these errors were encountered: