Last active
October 28, 2021 00:26
-
-
Save ljmf00/a35da0e41c3a2074d74960e981f43ca6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int unicodeå() | |
{ return 0; } | |
int foo(int[] a) | |
{ | |
bar(); | |
a ~= 1; | |
return a[0]; | |
} | |
void bar() | |
{ | |
(() @system {})(); | |
} | |
enum ABC { | |
A, | |
B, | |
C | |
} | |
struct Foo {} | |
struct Bar { | |
int a; | |
float b; | |
void[] c; | |
ABC abc = ABC.B; | |
string s = "artur"; | |
} | |
int foobar(int* p, int[] a, int[int] b, real c, Foo f, Bar bar) | |
{ | |
string sa = "atum"; | |
wstring sb = "wide atum"w; | |
dstring sc = "double atum"d; | |
char[] sd = "atum".dup; | |
dchar[] se = "double atum"d.dup; | |
wchar[] sf = "wide atum"w.dup; | |
const(char)[] sg = "atum".dup; | |
immutable(dchar)[] sh = "double atum"d.dup; | |
const(wchar)[] si = "wide atum"w.dup; | |
return *p; | |
} | |
class CFoo { | |
int a; | |
} | |
interface IFoo {} | |
class CIFoo : IFoo { | |
float c; | |
} | |
struct A_A {} | |
void main() | |
{ | |
auto a = foo([10]); | |
int* p = cast(int*)0xDEADBEEF; | |
ABC aaa = ABC.C; | |
size_t s; | |
real b = 1.0L; | |
A_A[] arr; | |
Bar* bar = new Bar(); | |
string str = "turtle"; | |
dstring dstr = "double turtle"; | |
wstring wstr = "wide turtle"; | |
CFoo cfoo = new CFoo(); | |
IFoo ifoo = new CIFoo(); | |
int[string] aarr = ["foo": 1, "bar": 2, "foobar": 0]; | |
int[A_A] aarr2; | |
int[char[]] aarr3; | |
char[][int] aarr4; | |
foobar(p, [1,2,3], [1:1, 2:2, 3:3], 123.123L, Foo(), Bar()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment