[Issue 9630] DMD git: can't access array field properties from static method
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Mar 2 05:31:15 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9630
bearophile_hugs at eml.cc changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bearophile_hugs at eml.cc
--- Comment #15 from bearophile_hugs at eml.cc 2013-03-02 05:31:13 PST ---
(In reply to comment #2)
> Workaround:
>
> assert(0 < typeof(i[0]).max);
This is acceptable.
This program:
struct Foo {
int i[1];
static void bar() {
assert(0 < i[0].max);
}
}
Currently gives:
temp.d(4): Error: need 'this' for i type int[1u].
But is it possible for the error message to suggest your solution to fix the
error?
temp.d(4): Error: need 'this' for i type int[1]. Use typeof(i[0]).max instead
--
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