Remove debug() / version() integers (#20713)

This commit is contained in:
Dennis 2025-01-16 08:20:06 +01:00 committed by GitHub
parent c0315897f6
commit 888917669c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 19 additions and 95 deletions

View file

@ -1,14 +1,10 @@
/*
TEST_OUTPUT:
---
fail_compilation/diag11198.d(17): Error: version `blah` declaration must be at module level
fail_compilation/diag11198.d(18): Error: debug `blah` declaration must be at module level
fail_compilation/diag11198.d(19): Deprecation: `version = <integer>` is deprecated, use version identifiers instead
fail_compilation/diag11198.d(19): Error: version `1` level declaration must be at module level
fail_compilation/diag11198.d(20): Deprecation: `debug = <integer>` is deprecated, use debug identifiers instead
fail_compilation/diag11198.d(20): Error: debug `2` level declaration must be at module level
fail_compilation/diag11198.d(21): Error: identifier or integer expected, not `""`
fail_compilation/diag11198.d(22): Error: identifier or integer expected, not `""`
fail_compilation/diag11198.d(13): Error: version `blah` declaration must be at module level
fail_compilation/diag11198.d(14): Error: debug `blah` declaration must be at module level
fail_compilation/diag11198.d(15): Error: identifier expected, not `""`
fail_compilation/diag11198.d(16): Error: identifier expected, not `""`
---
*/
@ -16,8 +12,6 @@ void main()
{
version = blah;
debug = blah;
version = 1;
debug = 2;
version = "";
debug = "";
}

View file

@ -1,8 +1,8 @@
/**
TEST_OUTPUT:
---
fail_compilation/diag_debug_conditional.d(1): Error: identifier or integer expected inside `debug(...)`, not `alias`
fail_compilation/diag_debug_conditional.d(2): Error: identifier or integer expected inside `version(...)`, not `alias`
fail_compilation/diag_debug_conditional.d(1): Error: identifier expected inside `debug(...)`, not `alias`
fail_compilation/diag_debug_conditional.d(2): Error: identifier expected inside `version(...)`, not `alias`
fail_compilation/diag_debug_conditional.d(3): Error: declaration expected following attribute, not end of file
---
*/

View file

@ -1,21 +1,15 @@
/*
TEST_OUTPUT:
---
fail_compilation/test13786.d(16): Deprecation: `debug = <integer>` is deprecated, use debug identifiers instead
fail_compilation/test13786.d(18): Deprecation: `version = <integer>` is deprecated, use version identifiers instead
fail_compilation/test13786.d(16): Error: debug `123` level declaration must be at module level
fail_compilation/test13786.d(17): Error: debug `abc` declaration must be at module level
fail_compilation/test13786.d(18): Error: version `123` level declaration must be at module level
fail_compilation/test13786.d(19): Error: version `abc` declaration must be at module level
fail_compilation/test13786.d(22): Error: template instance `test13786.T!()` error instantiating
fail_compilation/test13786.d(12): Error: debug `abc` declaration must be at module level
fail_compilation/test13786.d(13): Error: version `abc` declaration must be at module level
fail_compilation/test13786.d(16): Error: template instance `test13786.T!()` error instantiating
---
*/
template T()
{
debug = 123;
debug = abc;
version = 123;
version = abc;
}

View file

@ -1,14 +1,3 @@
// REQUIRED_ARGS: -verrors=simple
/*
TEST_OUTPUT:
---
runnable/lexer.d(86): Deprecation: `version( <integer> )` is deprecated, use version identifiers instead
runnable/lexer.d(87): Deprecation: `debug( <integer> )` is deprecated, use debug identifiers instead
---
*/
/*********************************************************/
void test6()
{
string s = q"(foo(xxx))";
@ -82,12 +71,6 @@ void test8()
/*********************************************************/
// https://issues.dlang.org/show_bug.cgi?id=6584
version(9223372036854775807){}
debug(9223372036854775807){}
/*********************************************************/
enum e13102=184467440737095516153.6L;
/*********************************************************/