Bug 24548 – [spec] Boolean condition conversion is not documented
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
dlang.org
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2024-05-12T15:57:15Z
Last change time
2024-05-12T23:28:57Z
Keywords
pull
Assigned to
No Owner
Creator
Nick Treleaven
Comments
Comment #0 by nick — 2024-05-12T15:57:15Z
E.g. for IfStatement, the spec just says:
> Expression is evaluated. The result is converted to a boolean, using opCast!bool() if the method is defined.
That is insufficient information. It should specify which types can be converted to bool, and how.
PR incoming.
Comment #1 by dlang-bot — 2024-05-12T16:01:09Z
@ntrel created dlang/dlang.org pull request #3830 "Fix Bugzilla 24548 - [spec] Boolean condition conversion is not docum…" fixing this issue:
- Fix Bugzilla 24548 - [spec] Boolean condition conversion is not documented
Add subheading for boolean conditions.
Also use subheading instead of panel for `if` condition variables.
https://github.com/dlang/dlang.org/pull/3830
Comment #2 by dlang-bot — 2024-05-12T23:28:57Z
dlang/dlang.org pull request #3830 "Fix Bugzilla 24548 - [spec] Boolean condition conversion is not docum…" was merged into master:
- e094010a34f32ce56a3a4db7df8b8f43fbe29b4d by Nick Treleaven:
Fix Bugzilla 24548 - [spec] Boolean condition conversion is not documented
Add subheading for boolean conditions.
Also use subheading instead of panel for `if` condition variables.
https://github.com/dlang/dlang.org/pull/3830