[Issue 9633] compiles trait wrongly returns true even when object method call actually does not compile
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Mar 2 08:06:37 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=9633
Vladimir Panteleev <thecybershadow at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |thecybershadow at gmail.com
--- Comment #3 from Vladimir Panteleev <thecybershadow at gmail.com> 2014-03-02 18:06:33 EET ---
Why is it a requirement that F() should not compile?
I have filed issue 12230 which is an opposite of this pull request.
Some things to be aware of:
- Inside speculative blocks (in __traits(compiles) or typeof(exp)), we always
pretend that we have an "is" pointer. This greatly simplifies writing template
constraints for methods, among other things.
- The rules for fields and methods differ when they are passed as alias
parameters (see issue 12230). When a field is passed as an alias parameter, the
template becomes nested within the field's aggregate (struct/class). When a
method is passed, this doesn't happen, which I think is an unwarranted
inconsistence.
--
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