-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swift 4.1 issue discovered around Structs with two Strings #3646
Comments
PR #3647 was merged as a temp fix until the issue is addressed in the Swift Docker image. |
I believe I have narrowed down the reasoning for this issue as coming from the use of the "@escaping" syntax in here https://github.com/apache/incubator-openwhisk-runtime-swift/blob/master/core/swift41Action/epilogue.swift#L98 I have stripped down this code the mainly the essentials (non-whisk related) items and when the "@escaping" option is present the code will throw a compiler error, however when I remove the statement the code will compile fine and execute successfully. I will be opening an issue against the Swift Docker image tomorrow and will link that here when I do. |
leaving open until we get a fix from swift team |
Issue moved to apache/incubator-openwhisk-runtime-swift #60 via ZenHub |
It was reported that the Swift 4.1 runtime was exhibiting a strange behavior. The behavior in question occurs when a Struct has multiple Strings and those Strings are being initialized directly from static Strings.
For instance, the following piece of code will work:
However the following code will not:
It appears to be a bug within Swift itself.
We have discovered that if the code is compiled with the compiler flag to turn off optimizations then the compiling will work. This compile flag is
-Xswiftc -Onone
The text was updated successfully, but these errors were encountered: