Bug 19654 – [REG master] cannot have final methods in objc interfaces

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Mac OS X
Creation time
2019-02-06T12:17:35Z
Last change time
2019-02-21T17:13:05Z
Assigned to
No Owner
Creator
Jacob Carlborg

Comments

Comment #0 by doob — 2019-02-06T12:17:35Z
The following code compiles successfully with DMD 2.084.0 but fails with master: extern (Objective-C) interface Bar { final void foo() @selector("foo") {} }
Comment #1 by doob — 2019-02-06T12:27:58Z
The error message is: Error: function `main.Bar.foo` function body only allowed in `final` functions in interface `Bar`
Comment #2 by razvan.nitu1305 — 2019-02-21T15:23:02Z
Running your example on run.dlang.io I get: Up to 2.064 : Failure with output: ----- onlineapp.d(1): Error: valid linkage identifiers are D, C, C++, Pascal, Windows, System onlineapp.d(1): Error: found '-' when expecting ')' onlineapp.d(1): Error: no identifier for declarator C onlineapp.d(1): Error: semicolon expected, not ')' onlineapp.d(1): Error: Declaration expected, not ')' ----- 2.065.0 to 2.066.0: Failure with output: ----- onlineapp.d(1): Error: valid linkage identifiers are D, C, C++, Pascal, Windows, System onlineapp.d(1): Error: found '-' when expecting ')' onlineapp.d(1): Error: no identifier for declarator C onlineapp.d(1): Error: Declaration expected, not ')' ----- 2.067.1 to 2.068.2: Failure with output: ----- onlineapp.d(1): Error: valid linkage identifiers are D, C, C++, Pascal, Windows, System onlineapp.d(1): Error: found '-' when expecting ')' onlineapp.d(1): Error: no identifier for declarator C onlineapp.d(1): Error: declaration expected, not ')' ----- 2.069.2 to 2.071.2: Failure with output: onlineapp.d(2): Error: interface onlineapp.Bar Objective-C interfaces not supported 2.072.2 to 2.074.1: Failure with output: ----- onlineapp.d(2): Error: interface onlineapp.Bar Objective-C interfaces not supported onlineapp.d(4): Error: undefined identifier 'selector' ----- 2.075.1 to 2.078.1: Failure with output: ----- onlineapp.d(2): Error: interface onlineapp.Bar Objective-C interfaces not supported onlineapp.d(4): Error: undefined identifier `selector` ----- Since 2.079.1: Failure with output: ----- onlineapp.d(2): Error: interface `onlineapp.Bar` Objective-C interfaces not supported onlineapp.d(4): Error: undefined identifier `selector` ----- How is this a regression?
Comment #3 by doob — 2019-02-21T17:12:19Z
(In reply to RazvanN from comment #2) > How is this a regression? A few reason why you're not finding the problem * Objective-C support was added in 2.069.0 [1], looking earlier is no point * The issue title starts with "[REG master]", i.e. the regression was in master, looking in any release is no point * Objective-C support is only available on macOS, testing on run.dlang.io will not work * This regression is already fixed [2]. Most have been during the time when the dlang-bot didn't work. [1] https://dlang.org/changelog/2.069.0.html#objective-c-support [2] https://github.com/dlang/dmd/pull/9329
Comment #4 by doob — 2019-02-21T17:13:05Z