www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - is(ulong : long) evaluates to true, is(int[] S) does not always compile

Per TDPL p. 66 is(ulong : long) should be false, but see below.
is(int[] S) did no compile outside of static if

Are these bugs?

import std.stdio;
void main(){

  bool z = is(int[]); //ok
  //bool z = is(int[] AZ);  //error only takes (T Sym) in static conditional
  static if (is(int[] AZ))  //ok
  bool a = is(uint : int), b = is(ulong : long);
  writefln("%s %s",a,b); //==> true true
Dec 29 2009