Issue 24851 - Some members of CustomFloat can have const this
Summary: Some members of CustomFloat can have const this
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 enhancement
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2024-11-10 12:52 UTC by Tim
Modified: 2024-11-10 22:25 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Tim 2024-11-10 12:52:56 UTC
The following currently fails for const variables:
```
    const CustomFloat!16 x = CustomFloat!16(3);
    assert(x.get!float == 3);
    assert(x.re.get!float == 3);
    assert(x + x == 6);
    assert(x + 1 == 4);
    assert(2 + x == 5);
    assert(x < 4);
```
Comment 1 Dlang Bot 2024-11-10 12:55:34 UTC
@tim-dlang created dlang/phobos pull request #9083 "Fix bugzilla 24851 - Some members of CustomFloat can have const this" fixing this issue:

- Fix bugzilla 24851 - Some members of CustomFloat can have const this

https://github.com/dlang/phobos/pull/9083
Comment 2 Dlang Bot 2024-11-10 22:25:43 UTC
dlang/phobos pull request #9083 "Fix bugzilla 24851 - Some members of CustomFloat can have const this" was merged into master:

- 8b051674ccad978a6668b074ac9c345c543c414a by Tim Schendekehl:
  Fix bugzilla 24851 - Some members of CustomFloat can have const this

https://github.com/dlang/phobos/pull/9083