Deprecation message sources

Steven Schveighoffer schveiguy at gmail.com
Tue Sep 17 21:22:32 UTC 2019


On 9/17/19 3:31 PM, Steven Schveighoffer wrote:
> Hi,
> 
> I just upgraded my compiler from 2.084 to 2.088, and I'm getting scores 
> of deprecation messages. One thing I've realized is that most of these 
> messages are generated by calls outside my code. These deprecation 
> messages are intended to tell you where you are calling them, but end up 
> telling you where phobos, or vibe.d, or whatever, is calling them.

Bug in compiler?

void foo(int y)
{
}

void main()
{
   Nullable!int x = 5;
   assert(x > 0); // No deprecation warning
   foo(x); // deprecation warning
}

Using -vcg-ast, it is indeed calling the _get function in both cases.

-Steve


More information about the Digitalmars-d-learn mailing list