Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

[SoM] Look more closely at typealias handling in demangler #67

Open
stephen-hawley opened this issue Apr 26, 2019 · 0 comments
Open

[SoM] Look more closely at typealias handling in demangler #67

stephen-hawley opened this issue Apr 26, 2019 · 0 comments
Milestone

Comments

@stephen-hawley
Copy link
Contributor

The swift type Foundation.OperatingSystemVersion comes through demangling as a typealias with the name __C.NSOperatingSystemVersion.

This is puzzling on a number of fronts.
First: in demangling, the TypeAlias only has the source type (__C.NSOperatingSystemVersion) and not the alias name.
Second: I can't find the actual declaration for Foundation.OperatingSystemVersion in the source to see how it's laid out.
Third: The TypeAlias has no underlying type category (struct? class? enum? protocol? closure?)

In the code in Swift5NodeToTLDefinition.cs in ConvertToTypeAlias, I make the assumption that the type is a struct if it starts with __C and I run it through a map to get the correct swift name. I really don't like this and doubt it will work on more general typealias types.

All of this needs to be tested better including looking at other type aliases. Maybe this is also an issue for implicitly unwrapped optionals (which are an alias for optionals?)

@stephen-hawley stephen-hawley transferred this issue from another repository Oct 29, 2019
@chamons chamons added this to the Future milestone Nov 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants