On Fri, 05 Dec 2014 07:06:34 +0000
Andre via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> wrote:

> Hi,
> 
> following coding fails to compile with 2.066.0 and
> 2.067.0-b1.
> 
> 
> This is a bug, or?
> source\app.d(9): Error: mixin 
> app.Data.insertReadMethods!("readTinyInt", ubyte)
> is not defined
> 
> template insertReadMethods(string MethodName, DataType)
> {
>       enum insertReadMethods = "";
> }
> 
> struct Data
> {
>       mixin insertReadMethods!("readTinyInt", ubyte);
>       mixin insertReadMethods!("readTinyInt", ubyte);
> }
> 
> void main(){}
not a bug. what you doing is actually:

  struct Data
  {
        enum insertReadMethods = "";
        mixin insertReadMethods!("readTinyInt", ubyte);
  }

`enum insertReadMethods` is definitely not a template, and compiler
correctly tells that to you.

Attachment: signature.asc
Description: PGP signature

Reply via email to