Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
August 01, 2005 deprecated functions/class methods not reported by dmd 0.128 | ||||
---|---|---|---|---|
| ||||
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 Re: deprecated functions/class methods not reported by dmd 0.128 | ||||
---|---|---|---|---|
| ||||
Posted in reply to zwang | 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 Re: deprecated functions/class methods not reported by dmd 0.128 | ||||
---|---|---|---|---|
| ||||
Posted in reply to zwang | > 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 Re: deprecated functions/class methods not reported by dmd 0.128 | ||||
---|---|---|---|---|
| ||||
Posted in reply to zwang | 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 Re: deprecated functions/class methods not reported by dmd 0.128 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Burton Radons | 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 Re: deprecated functions/class methods not reported by dmd 0.128 | ||||
---|---|---|---|---|
| ||||
Posted in reply to zwang Attachments: | 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 |
Copyright © 1999-2021 by the D Language Foundation