www.digitalmars.com         C & C++   DMDScript  

D - assert in compiler (line 1577 parse.c)

reply "Mike Wynn" <mike.wynn l8night.co.uk> writes:
testtemp.d(7): basic type expected, not 1
Assertion failure: 't' on line 1577 in file 'parse.c'

enum FOO {
 ONE, TWO
}

template MissingBinding( FOO T : FOO.ONE ) {
 alias 1 the_value;
}


alias 1 the_value;

causes -- testtemp.d(2): basic type expected, not 1
why can't I alias a value ???
Aug 02 2003
parent "Walter" <walter digitalmars.com> writes:
Alias is for symbols, not values. Use:
    const int the_value = 1;

"Mike Wynn" <mike.wynn l8night.co.uk> wrote in message
news:bghfv6$114o$1 digitaldaemon.com...
 testtemp.d(7): basic type expected, not 1
 Assertion failure: 't' on line 1577 in file 'parse.c'

 enum FOO {
  ONE, TWO
 }

 template MissingBinding( FOO T : FOO.ONE ) {
  alias 1 the_value;
 }


 alias 1 the_value;

 causes -- testtemp.d(2): basic type expected, not 1
 why can't I alias a value ???

Aug 02 2003