-
Notifications
You must be signed in to change notification settings - Fork 5
/
testd.d
59 lines (52 loc) · 1.08 KB
/
testd.d
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
__gshared int global_shared = 0x12345678;
uint global_tls = 0x89898989;
extern int global_extern;
extern(C) extern int _imp__blah();
extern(C) extern int _imp__;
public void func()
{
int[int] x;
try {
foreach(a, b; x) {}
} catch {
}
}
int main()
{
__gshared int static_shared;
static uint static_tls = 0x89898989;
global_shared = global_tls + static_shared + static_tls;
func();
main();
auto x = &main;
auto a = 1;
auto b = a + 1;
auto c = a + b + 1;
//_imp__ = _imp__blah();
return c;
}*/
import std.stdio, std.conv, std.typetuple;
void main(string[] args)
{
foreach(T; TypeTuple!(char, wchar, dchar, bool, byte, ubyte, short, ushort, int, uint, long, ulong, float, double, real, ifloat, idouble, ireal, cfloat, cdouble, creal))
{
T a;
const T b;
immutable T c;
T* d;
const(T)* e;
immutable(T)* f;
const(T*) g;
immutable(T*) h;
}
try
{
auto x = to!int(args[1]);
writeln(x);
}
catch
{
writeln("Or not...");
}
}