$ dmd testStructEnum.d testStructEnum.d(6): no property 'Id' for type 'Value' testStructEnum.d(6): Value.Id is used as a type testStructEnum.d(6): cannot have parameter of type void $ dmd testStructEnum.d -version=works gcc testStructEnum.o -o testStructEnum -m32 -lphobos -lpthread -lm -Xlinker -L/home/bsmith/tools/d/dmd/lib $ ./testStructEnum 1 ----- testStructEnum.d ----- import std.stdio; version(works) { } else { // Doesn't work void f(Value.Id t) { writefln(cast(int)t); } } struct Value { public static enum Id { A, B } } version(works) { void f(Value.Id t) { writefln(cast(int)t); } } void main() { Value.Id t = Value.Id.B; f(t); } ----------
Fails on Windows XP also.
It also fails with a struct nested within a struct. Probably part of the same bug. IIRC class within struct, struct within class and class within class all fail. ---------- struct Qwert { Yuiop.Asdfg hjkl; } struct Yuiop { struct Asdfg { int zxcvb; } } ----------
The patch in issue 282 also fixes this issue.
Fixed dmd 1.054 and 2.038
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル