On 04/08/14 23:05, Jeroen Bollen wrote:
> For some reason this code doesn't work...
>
> module app;
>
> void main() {
> immutable char var = 'a';
> immutable(char)* varPtr = &var;
> test(&varPtr);
> }
>
> void test(immutable(char)** param) {
> test2(param);
> }
>
> void test2(const(char)** test2) {
>
> }
>
> It'll give you " Error: function app.test2 (const(char)** test2) is not
> callable using argument types (immutable(char)**)", which makes no sense as
> if a function requests a constant variable, immutable should suffice.
void test2(const(char)** test2) {
static char b = 'b';
*test2 = &b;
}
artur