Bug 24017 – [UFCS] Bypassing `nothrow` with `debug` doesn’t work

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-06-27T08:26:18Z
Last change time
2023-06-27T15:24:36Z
Keywords
pull
Assigned to
No Owner
Creator
Georgy Markov

Comments

Comment #0 by ogion.art — 2023-06-27T08:26:18Z
import std.stdio; void main() nothrow { debug writeln("Hello"); // Works debug "Hello".writeln; // Error: function `std.stdio.writeln!string.writeln` is not `nothrow` }
Comment #1 by razvan.nitu1305 — 2023-06-27T10:48:33Z
The issue has nothing to do with CTFE. Reduction: void writeln(string) {} void main() nothrow { debug writeln("Hello"); // Works debug "Hello".writeln; // Error: function `test.writeln` is not nothrow }
Comment #2 by dlang-bot — 2023-06-27T11:14:31Z
@RazvanN7 created dlang/dmd pull request #15355 "Fix Issue 24017 - Bypassing with doesn’t work" fixing this issue: - Fix Issue 24017 - Bypassing with doesn’t work https://github.com/dlang/dmd/pull/15355
Comment #3 by dkorpel — 2023-06-27T13:48:39Z
*** Issue 23016 has been marked as a duplicate of this issue. ***
Comment #4 by dlang-bot — 2023-06-27T15:24:36Z
dlang/dmd pull request #15355 "Fix Issue 24017 - Bypassing nothrow with debug doesn’t work" was merged into master: - 0d2bea252760c0a020d44926cee356db7607a1b8 by RazvanN7: Fix Issue 24017 - Bypassing with doesn’t work https://github.com/dlang/dmd/pull/15355