Bug 19494 – [REG 2.080.0][objc] interface `main.NSObject.Class` conflicts with interface `main.NSObject.Class`

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Mac OS X
Creation time
2018-12-15T16:25:36Z
Last change time
2018-12-16T09:43:04Z
Assigned to
No Owner
Creator
Jacob Carlborg

Comments

Comment #0 by doob — 2018-12-15T16:25:36Z
The following code fails to compile using 2.080.0 or later: extern (Objective-C) interface NSObject { extern (Objective-C) interface Class {} } The error message is: Error: interface `main.NSObject.Class` conflicts with interface `main.NSObject.Class` The issue is that when Objective-C class methods were implemented the type of the metaclass was accidentally exposed as the "Class" member inside every Objective-C interface.
Comment #1 by github-bugzilla — 2018-12-16T09:43:03Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/c9bc1a68a41303e83e3df06bff7b9182755aceed Fix issue 19494: Remove implicit `Class` member for Objective-C interfaces The issue was that when support for Objective-C class methods was added, the metaclass was accidentally exposed as the `.Class` member for all Objective-C interfaces. https://github.com/dlang/dmd/commit/09f2198b25024a8bde75f7ef58609c8218e62ca3 Merge pull request #9083 from jacob-carlborg/19494-class-conflict Fix issue 19494: Remove implicit `Class` member for Objective-C interfaces