| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/fail18620.d(14): Error: `strlen` cannot be interpreted at compile time, because it has no available source code |
| 5 |
fail_compilation/fail18620.d(19): compile time context created here |
| 6 |
fail_compilation/fail18620.d(14): Error: `strlen` cannot be interpreted at compile time, because it has no available source code |
| 7 |
fail_compilation/fail18620.d(20): compile time context created here |
| 8 |
--- |
| 9 |
*/ |
| 10 |
class A{ |
| 11 |
this(const(char)* s) |
| 12 |
{ |
| 13 |
import core.stdc.string; |
| 14 |
auto a=strlen(s); |
| 15 |
} |
| 16 |
} |
| 17 |
|
| 18 |
void main(){ |
| 19 |
static a = new A("a"); |
| 20 |
__gshared b = new A("b"); |
| 21 |
} |