[Issue 3882] Unused result of pure functions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Mar 1 16:25:27 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=3882
--- Comment #17 from Per Nordlöw <per.nordlow at gmail.com> 2014-03-01 16:25:25 PST ---
> In general if a programmer is using an IDE it's easy to click on the function
> name at the call point, and jump to the function definition. So the second line
> is not necessary for programmers that use an IDE.
I don't think there are any IDEs that support semantic resolution of overloaded
and/or templated functions especially not when they are called through UFCS.
Maybe we should add an extra switch for extra context information...
> How is dmd acting in other situations for other errors/warnings? I think for
> functions the second line where the function is defines is usually not given.
>
> So perhaps a single error message like this is enough:
>
> test.d(30,17): Warning: discarded return value of pure function 'test.foo',
> prepend a cast(void) if intentional
D has both strict and weak purity. This issue is about strict purity. Shouldn't
this be mentioned in the warning?
Also: Does anyone know how to add the scope (in this case 'test') qualifier to
the function name?
--
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