Skip to content
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-8433] Runtime failure to demangle type for Codable property #50956

Closed
ffried opened this issue Aug 1, 2018 · 4 comments
Closed

[SR-8433] Runtime failure to demangle type for Codable property #50956

ffried opened this issue Aug 1, 2018 · 4 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself regression swift 4.2

Comments

@ffried
Copy link
Contributor

ffried commented Aug 1, 2018

Previous ID SR-8433
Radar None
Original Reporter @ffried
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

Environment

Apple Swift version 4.2 (swiftlang-1000.0.32.1 clang-1000.10.39)

Target: x86_64-apple-darwin18.0.0

Xcode 10 beta 5

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, 4.2Regression
Assignee None
Priority Medium

md5: 15884b7c48f138ea205dfb6776f2536e

duplicates:

  • SR-8354 Runtime warning on failure to demangle type

Issue Description:

The following code emits a Runtime warning that the type of the field value couldn't be demangled:

struct ABC {
    let value: Codable
}

let tmp = ABC(value: "test")
let value = Mirror(reflecting: tmp).descendant("value")
print(value as Any)

Output:

$ swift s42_demanglingFailure.swift 
SWIFT RUNTIME BUG: unable to demangle type of field 'value'. mangled type name is 'Se_SEp'
SWIFT RUNTIME BUG: unable to demangle type of field 'value'. mangled type name is 'Se_SEp'
Optional(())
@belkadan
Copy link
Contributor

belkadan commented Aug 1, 2018

@jckarter, @mikeash, does this look familiar?

@mikeash
Copy link
Contributor

mikeash commented Aug 1, 2018

Not to me, but at least it's really easy to reproduce!

Doesn't happen when using a freshly built swift from master. Will try the latest 4.2.

@ffried
Copy link
Contributor Author

ffried commented Aug 1, 2018

I assume it's the same underlying cause, but this also happens when value is either Encodable or Decodable. Except that then the mangled type name is 'SE_p'...

@jckarter
Copy link
Member

jckarter commented Aug 1, 2018

This sounds like a dup of SR-8354.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself regression swift 4.2
Projects
None yet
Development

No branches or pull requests

5 participants