[Issue 3209] Please allow pure functions with input known at compile time to be executed at compile time
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jul 26 16:24:13 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3209
Stewart Gordon <smjg at iname.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |smjg at iname.com
--- Comment #1 from Stewart Gordon <smjg at iname.com> 2009-07-26 16:24:12 PDT ---
Please don't set a bug to invalid without giving a reason. I nearly reopened
it pending an explanation, but then realised why this shouldn't work.
isEmptyString won't always be evaluated at compile-time, hence it's an attempt
at a static if on a non-CTC expression.
That said, the compiler output is slightly bloated, but that's another matter:
----------
bz3209.d(2): Error: expression str == "" is not constant or does not evaluate
to a bool
bz3209.d(8): Error: cannot evaluate isEmptyString("") at compile time
bz3209.d(8): Error: expression isEmptyString("") is not constant or does not
evaluate to a bool
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list