[Issue 3882] Unused result of pure functions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Mar 21 12:37:57 PDT 2014
https://d.puremagic.com/issues/show_bug.cgi?id=3882
bearophile_hugs at eml.cc changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
--- Comment #35 from bearophile_hugs at eml.cc 2014-03-21 12:37:55 PDT ---
Now this code:
int foo(int x) pure nothrow {
return x - 1;
}
void main() {
foo(5);
}
Gives:
test.d(5,8): Warning: Call to strictly pure function test.foo discards return
value of type int, prepend a cast(void) if intentional
Issue fixed.
--
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