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-10177] Failed to demangle superclass when using Objective-C type as type argument #52579
Comments
Comment by Svyatoslav Scherbina (JIRA) The similar test crashes with segmentation fault if The issue seem to appear only when the corresponding Objective-C class or protocol definition is not found among linked binaries. |
I think it's reasonable for that not to work, but it would be nice™ if it gave a more direct error message. cc @DougGregor |
I agree with both of Jordan's comments: it's reasonable for this to fail, because the metadata for `Foo` needs to exist in the binary. It would also be wonderful to have a more specific error message when the process of constructing types from a mangled name fails. |
Comment by Svyatoslav Scherbina (JIRA) Please consider the following two failing examples: 1. import Accounts
class Base<T> {}
class Derived : Base<ACAccount> {}
Derived() Accounts framework is not linked because not considered as used by the compiler. And then Swift runtime fails because it can't find the class from this framework. 2. import Foundation
class Base<T> {}
class Derived : Base<NSURLDownloadDelegate> {}
Derived() Foundation framework is linked, but protocols code is generated on demand, and Do you still find current behaviour completely reasonable? |
Both of those cases are bugs in the compiler (or linker) in that they don't consider the framework to be used! Can you file a separate bug for that? |
Comment by Svyatoslav Scherbina (JIRA) Sure! SR-10217 |
Environment
Additional Detail from JIRA
md5: 82002288449e014fc4cc52035d72b0d1
Issue Description:
1.h
1.swift:
The resulting binary crashes with
The text was updated successfully, but these errors were encountered: