odd atomicOp errors from vibe-core

Iain Buclaw ibuclaw at gdcproject.org
Sun Apr 12 10:30:08 UTC 2020


On Friday, 10 April 2020 at 01:54:14 UTC, Steven Schveighoffer 
wrote:
> I'm building a library that uses vibe-core as an indirect 
> dependency. Specifically, I'm testing the library with dub test.
>
> A very odd thing happens as I'm picking off compiler errors one 
> at a time. After all the errors that I created are listed, I 
> get this list:
>

[--snip--]

> Error: template core.atomic.atomicOp cannot deduce function 
> from argument types !("-=")(shared(uint), int), candidates are:
> /home/steves/.dvm/compilers/dmd-2.091.0/linux/bin/../../src/druntime/import/core/atomic.d(543,14):
>        atomicOp(string op, T, V1)(ref shared T val, V1 mod)
>   with op = "-=",
>        T = uint,
>        V1 = int
>   must satisfy the following constraint:
>        __traits(compiles, mixin("*cast(T*)&val" ~ op ~ "mod"))

[--snip--]

> ../../../.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d(2006,22): Error: template core.atomic.atomicOp cannot deduce function from argument types !("+=")(shared(uint), int), candidates are:
>
> And then it just abruptly ends there.
>
> I'm not sure why all these errors come out. Looking at the 
> code, it seems to have nothing to do with my code. Once I fix 
> my code errors (which are legitimate errors that I made), then 
> these mysteriously go away. I'm not calling any of these 
> functions that it's spitting out.
>
> Why are these being triggered? Why do they all of a sudden go 
> away? Does anyone else see this? Is it specifically something 
> with vibe-core? Is it something to do with dub?
>


This is a regression caused by 
https://github.com/dlang/dmd/pull/10711


More information about the Digitalmars-d-learn mailing list