mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
Fix bypassing nothrow in debug statements (#20720)
* Fix bypassing nothrow in debug statements * Fix debug walking null statements
This commit is contained in:
parent
b237d0329c
commit
ac9e8a5a70
4 changed files with 27 additions and 19 deletions
|
@ -85,3 +85,17 @@ void test6() nothrow
|
|||
() {throw new Exception("");}();
|
||||
}
|
||||
}
|
||||
|
||||
void writeln() {}
|
||||
void writeln(string) {}
|
||||
|
||||
void test7() nothrow
|
||||
{
|
||||
debug writeln("Hello"); // https://issues.dlang.org/show_bug.cgi?id=24017
|
||||
debug "Hello".writeln;
|
||||
debug writeln = "Hello"; // https://github.com/dlang/dmd/issues/20719
|
||||
debug writeln;
|
||||
|
||||
// https://github.com/dlang/dmd/pull/20720#issuecomment-2596892489
|
||||
debug pragma(msg, ""); // Came up as segfault, pragma statement became null after semantic
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
// https://issues.dlang.org/show_bug.cgi?id=24017
|
||||
|
||||
// REQUIRED_ARGS: -debug
|
||||
|
||||
void writeln(string) {}
|
||||
|
||||
void main() nothrow
|
||||
{
|
||||
debug writeln("Hello");
|
||||
debug "Hello".writeln;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue