-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Open
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfruntimeThe Swift RuntimeThe Swift Runtime
Description
Previous ID | SR-10562 |
Radar | None |
Original Reporter | @lilyball |
Type | Bug |
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
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).
For example, with the following Obj-C header:
extern NSErrorDomain const FooErrorDomain;
typedef NS_ERROR_ENUM(FooErrorDomain, FooError) {
FooErrorOne = 1,
FooErrorTwo
};
Printing a FooError(.one)
from Swift produces the description
related decl 'e' for FooError(_nsError: Error Domain=FooErrorDomain Code=1 "(null)")
And the debug description looks like
__C_Synthesized.related decl 'e' for FooError(_nsError: Error Domain=FooErrorDomain Code=1 "(null)")
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfruntimeThe Swift RuntimeThe Swift Runtime