blob: e80a130d1422b9e8e1866d8e069da283e953614e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
//TEST:EXECUTABLE:
__target_intrinsic(cpp, "printf(\"%s\\n\", ($0).getBuffer())")
void writeln(String text);
[COM("BE18F5D2-4522-4AB0-A6EE-1D157FA2B083")]
interface IFoo
{
int method();
};
class Impl : IFoo
{
__init() { }
int method()
{
return 0;
}
}
void createFoo(out IFoo val)
{
Impl resuult = new Impl();
val = resuult;
}
export __extern_cpp int main()
{
IFoo v;
createFoo(v);
if (v.method() == 0)
writeln("succ");
else
writeln("fail");
return 0;
}
|