You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lilyballmannequin opened this issue
Apr 26, 2019
· 5 comments
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfruntimeThe Swift Runtime
Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5)
Target: x86_64-apple-darwin18.5.0
Additional Detail from JIRA
Votes
0
Component/s
Compiler
Labels
Bug, Runtime
Assignee
None
Priority
Medium
md5: e29b89b358725c5ca7df0cc90a76c495
Issue Description:
When printing an error created from an Obj-C NS_ERROR_ENUM declaration, the imported error has a bizarre synthesized description that looks like "related decl 'e' for <desc>" (where <desc> is the actual expected description).
Yeah, I'm not sure what to do about this one. "FooError" is officially the C enum, not the wrapper struct, but maybe that doesn't matter when doing a demangling that doesn't have to be unique.
@mikeash, any opinions? (Or Lily, for that matter.) I wrote the original code here but only to fit imported errors into the existing demangling framework, not because I was finessing the output to some spec.
Yeah, I'm not thrilled at the _nsError: output but it's at least understandable and clearly a field of the type. The "related decl 'e' for" is just confusing, and if it were removed but everything else left as-is that would be fine (and would match how e.g. CocoaError is printed).
Though I'd also suggest that the __C_Synthesized. prefix on the debug description should go away as well.
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfruntimeThe Swift Runtime
Environment
Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5)
Target: x86_64-apple-darwin18.5.0
Additional Detail from JIRA
md5: e29b89b358725c5ca7df0cc90a76c495
Issue Description:
When printing an error created from an Obj-C
NS_ERROR_ENUM
declaration, the imported error has a bizarre synthesized description that looks like "related decl 'e' for <desc>" (where <desc> is the actual expected description).For example, with the following Obj-C header:
Printing a
FooError(.one)
from Swift produces the descriptionAnd the debug description looks like
The text was updated successfully, but these errors were encountered: