[Issue 9831] Error message with failed lambda inference
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Nov 17 04:09:27 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=9831
--- Comment #3 from yebblies <yebblies at gmail.com> 2013-11-17 23:09:26 EST ---
(In reply to comment #2)
>
> So I think this issue is valid, the type inferencer could become a bit smarter
> and compile the first case too. But perhaps this issue should be regarded as an
> Enhancement.
What makes you think the first case is valid?
void main() {
immutable int c; // immutable local variable
int function(int x) func;
func = x => c; // needs context to access c
}
What exactly would you expect to happen?
A similar case:
void main(string[] args) {
immutable int c = args.length;
int function(int x) func;
func = x => c;
}
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list