D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 21199 - Nullable.apply should take string expression like rest of Phobos
Summary: Nullable.apply should take string expression like rest of Phobos
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P1 trivial
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2020-08-26 11:25 UTC by FeepingCreature
Modified: 2020-08-26 13:01 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 FeepingCreature 2020-08-26 11:25:24 UTC
struct S { int i; }

assert(S(5).nullable.apply!"a.i" == 5);

This should work, but does not.
Comment 1 Dlang Bot 2020-08-26 11:30:12 UTC
@FeepingCreature created dlang/phobos pull request #7606 "Fix issue 21199: call `unaryFun!fun` in `Nullable.apply` to support string parameter." fixing this issue:

- Fix issue 21199: call `unaryFun!fun` in `Nullable.apply` to support shortcut string expressions as parameter.

https://github.com/dlang/phobos/pull/7606
Comment 2 Dlang Bot 2020-08-26 13:01:11 UTC
dlang/phobos pull request #7606 "Fix issue 21199: call `unaryFun!fun` in `Nullable.apply` to support string parameter." was merged into master:

- 44522538471065be50005eaf848ed757375073cd by Mathis Beer:
  Fix issue 21199: call `unaryFun!fun` in `Nullable.apply` to support shortcut string expressions as parameter.

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