Thread overview
deprecated functions/class methods not reported by dmd 0.128
Aug 01, 2005
zwang
Aug 01, 2005
zwang
Aug 01, 2005
Vathix
Aug 02, 2005
Thomas Kühne
Aug 02, 2005
Burton Radons
Aug 02, 2005
zwang
August 01, 2005
Code calling deprecated functions should not compile, but dmd doesn't frown on the following:

<code>
deprecated void f(){}
void main(){
  debug f();
}
</code>
August 01, 2005
zwang wrote:
> Code calling deprecated functions should not compile, but dmd doesn't frown on the following:
> 
> <code>
> deprecated void f(){}
> void main(){
>   debug f();
> }
> </code>

Another example that shouldn't compile:

<code>
deprecated void main(){}
</code>
August 01, 2005
> Another example that shouldn't compile:
>
> <code>
> deprecated void main(){}
> </code>

lol. Maybe it should compile and automatically throw DeprecatedProgramError when run :p
August 02, 2005
zwang wrote:

> Code calling deprecated functions should not compile, but dmd doesn't frown on the following:
> 
> <code>
> deprecated void f(){}
> void main(){
>   debug f();
> }
> </code>

-debug is not automatically enabled.  That code allegedly using the deprecated function is uncompiled, which only needs to be syntactically correct.
August 02, 2005
Burton Radons wrote:
> zwang wrote:
> 
>> Code calling deprecated functions should not compile, but dmd doesn't frown on the following:
>>
>> <code>
>> deprecated void f(){}
>> void main(){
>>   debug f();
>> }
>> </code>
> 
> 
> -debug is not automatically enabled.  That code allegedly using the deprecated function is uncompiled, which only needs to be syntactically correct.

I meant to turn on the -debug switch. But I made a silly mistake while reducing the test case. Yes, you are right. dmd handles the case correctly.


August 02, 2005
zwang schrieb:
> Another example that shouldn't compile:
> 
> <code>
> deprecated void main(){}
> </code>

Added to DStress as http://dtsress.kuehne.cn/nocompile/d/deprecated_20.d

Thomas