| 1 |
void foo(alias param)() |
| 2 |
{ |
| 3 |
} |
| 4 |
|
| 5 |
const CONST1 = 1; |
| 6 |
const CONST2 = 1; |
| 7 |
static assert(&foo!CONST1 !is &foo!CONST2); |
| 8 |
static assert(foo!CONST1.mangleof != foo!CONST2.mangleof); |
| 9 |
|
| 10 |
immutable IMM1 = 1; |
| 11 |
immutable IMM2 = 1; |
| 12 |
static assert(&foo!IMM1 !is &foo!IMM2); |
| 13 |
static assert(foo!IMM1.mangleof != foo!IMM2.mangleof); |
| 14 |
|
| 15 |
// Behaves different for manifest constants! |
| 16 |
enum ENUM1 = 1; |
| 17 |
enum ENUM2 = 1; |
| 18 |
static assert(&foo!ENUM1 is &foo!ENUM2); |
| 19 |
static assert(foo!ENUM1.mangleof == foo!ENUM2.mangleof); |