http://d.puremagic.com/issues/show_bug.cgi?id=772


[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |INVALID




------- Comment #4 from [EMAIL PROTECTED]  2008-11-08 12:34 -------
const should be added to the variable declaration, so the error message is
correct. Add const and it works in DMD 2.020 and 1.033.

module bug ;

template foo (ulong n) {
  static if (n < 10_LU) {
    const foo = n ;
  }
  else {
    const foo = n % 10 ;
  }
}

void main () {
  const ulong a = 1_LU ; // <- added const

  auto omega = foo!(a);
}


-- 

Reply via email to