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
[SR-4375] Using Generic with Protocols causes Segmentation Fault #46954
Comments
Reproduced on master:
|
Looks like we still don't handle direct references to protocol methods. Reduced:
@jckarter, what's the bug for this? arup193 (JIRA User), your workaround is to pass an explicit closure instead, something like
|
I think @slavapestov has that one. |
Comment by Arup Dandapat (JIRA) Jordan Rose, thanks for the work around. |
AnthonyLatsis
added
the
crash
Bug: A crash, i.e., an abnormal termination of software
label
Dec 12, 2022
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
MacBook Pro
Operating System: OS X El Capitan (10.11.6)
RAM: 16GB
Xcode: 8.2.1
Swift Version: 3.0.2
Additional Detail from JIRA
md5: 6420fbb80f768d47f694f48e2932126c
duplicates:
Issue Description:
I will explain the issue with a sample example, that you can run on a playground project.
OUTPUT:
First I Observer: 1
Second I Observer: 1
Explanation:
The above example fails and does not build giving Command failed due to signal: Segmentation Fault: 11, when I change IProtocol to protocol from class. I have different protocols and different observer classes confirming those protocols. I am trying to implement a Notifier class that notifies the observers by taking the method from the protocol and arguments to be passed for that method.
Note:
I remove the {} from meth1(arg: ) and also remove the override keyword from IObserver class, when I change IProtocol to a protocol
The text was updated successfully, but these errors were encountered: