mirror of
https://github.com/dlang/dmd.git
synced 2025-04-27 05:30:13 +03:00
Skip selector-gen for templates
This commit is contained in:
parent
5df19d9231
commit
8a7108f8c9
2 changed files with 5 additions and 1 deletions
|
@ -594,6 +594,10 @@ extern(C++) private final class Supported : Objc
|
|||
return 0;
|
||||
});
|
||||
|
||||
// Avoid attempting to generate selectors for template instances.
|
||||
if (fd.parent && fd.parent.isTemplateInstance())
|
||||
return;
|
||||
|
||||
// No selector declared, generate one.
|
||||
if (fd._linkage == LINK.objc && !fd.objc.selector)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ class MyClass : NSObject
|
|||
int x;
|
||||
|
||||
override static MyClass alloc() => cast(MyClass)super.alloc();
|
||||
override MyClass init() { x = 42; }
|
||||
override MyClass init() { x = 42; return this; }
|
||||
|
||||
@property bool isFourtyTwo() => x == 42;
|
||||
@property void isFourtyTwo(bool value) { x = value ? 42 : 0; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue