Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memoize doesn't work with default params #10394

Open
dlangBugzillaToGithub opened this issue Oct 14, 2019 · 0 comments
Open

memoize doesn't work with default params #10394

dlangBugzillaToGithub opened this issue Oct 14, 2019 · 0 comments
Labels
Arch:x86_64 Issues specific to x86_64 OS:Linux Issues specific to Linux Severity:Enhancement

Comments

@dlangBugzillaToGithub
Copy link

trikkuz reported this on 2019-10-14T15:51:05Z

Transfered from https://issues.dlang.org/show_bug.cgi?id=20300

Description

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
@LightBender LightBender removed the P4 label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch:x86_64 Issues specific to x86_64 OS:Linux Issues specific to Linux Severity:Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants