← Back to index
|
Original Bugzilla link
Bug 20300 – memoize doesn't work with default params
Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2019-10-14T15:51:05Z
Last change time
2024-12-01T16:35:50Z
Assigned to
No Owner
Creator
Andrea Fontana
Moved to GitHub: phobos#10394 →
Comments
Comment #0
by trikkuz — 2019-10-14T15:51:05Z
import std; int test(int a = 0) { return a; } alias cached = memoize!test; void main() { cached(0); // Works; cached(1); // Works; cached(); // Error } Error: function std.functional.memoize!(test).memoize(int _param_0) is not callable using argument types () onlineapp.d(11): missing argument for parameter #1: int _param_0
Comment #1
by robert.schadek — 2024-12-01T16:35:50Z
THIS ISSUE HAS BEEN MOVED TO GITHUB
https://github.com/dlang/phobos/issues/10394
DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB