Alias parameter + AA + external module
Dicebot
m.strashun at gmail.com
Fri Feb 8 07:04:23 PST 2013
== mod.d ==
void func!(alias arr)()
{
arr["key"] = 43;
}
== test.d ==
import mod;
void main()
{
auto arr = [ "key" : 42 ];
func!(arr)();
}
== shell ==
$ rdmd test.d
.../test.o: In function
`_D4test4mainFZv36__T4funcS24_D4test4mainFZv3arrHAyaiZ4funcMFZv':
test.d:(.text._D4test4mainFZv36__T4funcS24_D4test4mainFZv3arrHAyaiZ4funcMFZv+0x3e):
undefined reference to `_D3mod7__arrayZ'
collect2: ld returned 1 exit status
--- errorlevel 1
This works if I move func to main module. Also works when passing
integer variable as an alias param. Also works on x32 linux, but
fails on x64.
What should I blame and search in bugzilla for? :) My code has
used this idiom extensively and encountering this while checking
x64 compatibility was an unpleasant surprise :(
More information about the Digitalmars-d-learn
mailing list