[Issue 2355] is() doesn't resolve aliases before template matching

2011-07-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2355


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #5 from Walter Bright  2011-07-17 
17:21:46 PDT ---
https://github.com/D-Programming-Language/dmd/commit/caf0c7ff55d42002b534b4ef67f6581e1db078fe

https://github.com/D-Programming-Language/dmd/commit/145d6dbc3a542bac1451dec4fb77a1823e755777

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2355] is() doesn't resolve aliases before template matching

2011-07-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2355


yebblies  changed:

   What|Removed |Added

 CC||pun...@coverify.org


--- Comment #4 from yebblies  2011-07-13 11:25:35 EST ---
*** Issue 6304 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2355] is() doesn't resolve aliases before template matching

2011-07-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2355


yebblies  changed:

   What|Removed |Added

   Keywords|wrong-code  |patch, rejects-valid
 CC||yebbl...@gmail.com
   Platform|x86 |All
Version|2.019   |D2
 OS/Version|Windows |All


--- Comment #3 from yebblies  2011-07-12 18:41:18 EST ---
https://github.com/D-Programming-Language/dmd/pull/238

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2355] is() doesn't resolve aliases before template matching

2011-07-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2355


yebblies  changed:

   What|Removed |Added

 CC||c...@klickverbot.at


--- Comment #2 from yebblies  2011-07-12 18:31:22 EST ---
*** Issue 5830 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2355] is() doesn't resolve aliases before template matching

2009-04-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2355


clugd...@yahoo.com.au changed:

   What|Removed |Added

Summary|is() fails to recognize a   |is() doesn't resolve aliases
   |static array|before template matching




--- Comment #1 from clugd...@yahoo.com.au  2009-04-08 08:00 ---
Actually, the bug is not really a problem with static arrays. The problem is
just that is() isn't resolving aliases. If you replace 'size_t' with 'int' or
'uint', it works fine.
BTW the original code no longer works, since literals are now dynamic arrays,
not static arrays.

template IsStaticSmart(T) {
  static if (is( T E : E[S], int S))
enum IsStaticSmart = "true: " ~ E.stringof;
  else
enum IsStaticSmart = "false";
}

alias int AliasInt;

template IsStaticSmart2(T) {
  static if (is( T E : E[S], AliasInt S))
enum IsStaticSmart2 = "true: " ~ E.stringof;
  else
enum IsStaticSmart2 = "false";
}

char [3] z;

pragma(msg, IsStaticSmart!(typeof(z)));
pragma(msg, IsStaticSmart2!(typeof(z)));

DMD2.028 displays:
true: char
false


--