Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 48082ac

Browse files
authored
Merge pull request #3108 from jacob-carlborg/object-selector-deprecate
Deprecate `object.selector` merged-on-behalf-of: Mathias LANG <pro.mathias.lang@gmail.com>
2 parents 40d5de0 + 4169438 commit 48082ac

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Deprecated `object.selector`
2+
3+
The public import of `selector` in the module `object` has been deprecated.
4+
Please explicitly import `selector` instead using: `import core.attribute : selector;`
5+
6+
The following code has been deprecated:
7+
8+
```
9+
extern (Objective-C)
10+
extern class NSObject
11+
{
12+
static NSObject alloc() @selector("alloc");
13+
}
14+
```
15+
16+
Replace with:
17+
18+
```
19+
import core.attribute : selector;
20+
21+
extern (Objective-C)
22+
extern class NSObject
23+
{
24+
static NSObject alloc() @selector("alloc");
25+
}
26+
```

src/object.d

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ alias string = immutable(char)[];
3636
alias wstring = immutable(wchar)[];
3737
alias dstring = immutable(dchar)[];
3838

39-
version (D_ObjectiveC) public import core.attribute : selector;
39+
version (D_ObjectiveC)
40+
{
41+
deprecated("explicitly import `selector` instead using: `import core.attribute : selector;`")
42+
public import core.attribute : selector;
43+
}
4044
version (Posix) public import core.attribute : gnuAbiTag;
4145

4246
// Some ABIs use a complex varargs implementation requiring TypeInfo.argTypes().

0 commit comments

Comments
 (0)