[Issue 2848] static if (is(type)) + alias fails to compile
https://issues.dlang.org/show_bug.cgi?id=2848 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Version|1.043 |D1 --
[Issue 2848] static if (is(type)) + alias fails to compile
http://d.puremagic.com/issues/show_bug.cgi?id=2848 --- Comment #6 from Leandro Lucarella llu...@gmail.com 2010-06-22 06:09:05 PDT --- Thanks!(In reply to comment #5) (In reply to comment #4) Works in DMD 1.062, I don't know when it got fixed. I guess it will work in DMD 2.0xx, but I don't have one installed to test. If somebody wants to try it, this bug can be closed (maybe Don who seems to bisect a lot and has an environment to do that easily wants to bisect DMD to see when it got fixed and add the proper changelog entry ;). No probs. Fixed DMD 1.050. Thanks =) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2848] static if (is(type)) + alias fails to compile
http://d.puremagic.com/issues/show_bug.cgi?id=2848 --- Comment #4 from Leandro Lucarella llu...@gmail.com 2010-06-21 17:53:23 PDT --- Works in DMD 1.062, I don't know when it got fixed. I guess it will work in DMD 2.0xx, but I don't have one installed to test. If somebody wants to try it, this bug can be closed (maybe Don who seems to bisect a lot and has an environment to do that easily wants to bisect DMD to see when it got fixed and add the proper changelog entry ;). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2848] static if (is(type)) + alias fails to compile
http://d.puremagic.com/issues/show_bug.cgi?id=2848 Don clugd...@yahoo.com.au changed: What|Removed |Added Status|NEW |RESOLVED CC||clugd...@yahoo.com.au Resolution||FIXED --- Comment #5 from Don clugd...@yahoo.com.au 2010-06-21 21:04:18 PDT --- (In reply to comment #4) Works in DMD 1.062, I don't know when it got fixed. I guess it will work in DMD 2.0xx, but I don't have one installed to test. If somebody wants to try it, this bug can be closed (maybe Don who seems to bisect a lot and has an environment to do that easily wants to bisect DMD to see when it got fixed and add the proper changelog entry ;). No probs. Fixed DMD 1.050. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2848] static if (is(type)) + alias fails to compile
http://d.puremagic.com/issues/show_bug.cgi?id=2848 --- Comment #1 from llu...@gmail.com 2009-04-17 12:28 --- BTW, using static if (is(typeof(no_type))) doesn't work either. --
[Issue 2848] static if (is(type)) + alias fails to compile
http://d.puremagic.com/issues/show_bug.cgi?id=2848 --- Comment #3 from fvbom...@wxs.nl 2009-04-17 12:31 --- Workaround: alias char[] String; static if (!is(no_type)) alias String no_type; no_type x; It seems to fail when the aliased type is a primitive type or array (static, dynamic or associative). It doesn't fail if it's a class, struct, enum, typedef or aliased type. --
[Issue 2848] static if (is(type)) + alias fails to compile
http://d.puremagic.com/issues/show_bug.cgi?id=2848 --- Comment #2 from llu...@gmail.com 2009-04-17 12:30 --- It seems to happen for array, int and float aliasee, but not for Object or struct types... This workaround works: alias char[] String; static if (!is(no_type)) { alias String no_type; no_type y; } no_type x; It seems not to fail when aliassed to user-defined types (classes, structs, enums, aliases, typedefs), but for primitive types and arrays it fails. typedef have the same problem. --