[Issue 8169] New: Method loses its compile-time evaluability when used through alias this
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed May 30 10:15:45 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8169
Summary: Method loses its compile-time evaluability when used
through alias this
Product: D
Version: D2
Platform: x86_64
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: tommitissari at hotmail.com
--- Comment #0 from Tommi <tommitissari at hotmail.com> 2012-05-30 10:17:34 PDT ---
struct ValueImpl
{
static immutable(int) getValue()
{
return 42;
}
}
struct ValueUser
{
ValueImpl m_valueImpl;
alias m_valueImpl this;
}
void main(string[] args)
{
static assert(ValueUser.getValue() == 42); // #1
}
Line #1 doesn't compile. Error: variable m_valueImpl cannot be read
at compile time
--
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