Very clever compiling error with mangling

kinke noone at nowhere.com
Sat Jun 4 20:22:31 UTC 2022


On Saturday, 4 June 2022 at 20:09:45 UTC, mesni wrote:
> ```
> source\api.d(6,5): Error: Function type does not match 
> previously declared function with the same mangled name: 
> `_D3api8testFuncFiiZi`
> source\api.d(6,5):        Previous IR type: void ()
> source\api.d(6,5):        New IR type:      i32 (i32, i32)
> ```

The D snippet you posted has apparently nothing to do with the 
error. It's complaining about 2 different signatures (in 
different modules) for some `int api.testFunc(int, int)`, with 
one being a `void()` (and so definitely not matching the mangled 
signature). Likely an incompatible signature in an `api.di`.


More information about the digitalmars-d-ldc mailing list