mirror of
https://github.com/dlang/dmd.git
synced 2025-04-27 05:30:13 +03:00
Move dmd files into compiler/
This commit is contained in:
parent
20bd0cacbd
commit
6374bb87b7
4579 changed files with 4 additions and 4 deletions
24
compiler/test/runnable/objc_call_static.d
Normal file
24
compiler/test/runnable/objc_call_static.d
Normal file
|
@ -0,0 +1,24 @@
|
|||
// EXTRA_OBJC_SOURCES:
|
||||
// REQUIRED_ARGS: -L-framework -LFoundation
|
||||
|
||||
import core.attribute : selector;
|
||||
|
||||
extern (Objective-C)
|
||||
extern class NSObject
|
||||
{
|
||||
static NSObject alloc() @selector("alloc");
|
||||
static NSObject allocWithZone(void* zone) @selector("allocWithZone:");
|
||||
|
||||
NSObject init() @selector("init");
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
auto obj1 = NSObject.alloc();
|
||||
auto obj2 = NSObject.allocWithZone(null);
|
||||
auto obj3 = NSObject.alloc().init();
|
||||
|
||||
assert(obj1 !is null);
|
||||
assert(obj2 !is null);
|
||||
assert(obj3 !is null);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue