Is this a bug?

Walter Bright newshound at digitalmars.com
Sat Apr 15 01:09:19 PDT 2006


Thomas Kuehne wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Li Jie schrieb am 2006-04-12:
>> In article <e1fa64$17nq$1 at digitaldaemon.com>, Li Jie says...
>>> Code:
>>>
>>> template test(char[] str)
>>> {
>>> const char test = test1!(str[0]);  // #LINE 87
>>> }
>>>
>>> template test1(char c)
>>> {
>>> const char test1 = c;
>>> }
>> Modify "test1!(str[0])" to "test1!((str[0]))" can solve the problem.
> 
> Added to DStress as
> http://dstress.kuehne.cn/compile/t/template_35_A.d
> http://dstress.kuehne.cn/compile/t/template_35_B.d
> http://dstress.kuehne.cn/compile/t/template_35_C.d

This is a known issue - a template argument that looks like a type is 
treated as a type.



More information about the Digitalmars-d-bugs mailing list