UDA failling to build when using delegate

bioinfornatics via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Nov 4 13:58:47 PST 2014


On Tuesday, 4 November 2014 at 00:32:52 UTC, bioinfornatics wrote:
> On Monday, 3 November 2014 at 23:53:53 UTC, bioinfornatics 
> wrote:
>> Dear,
>>
>> why this code fail to build http://dpaste.dzfl.pl/8ef3898b05d2 
>> ?
>>
>> I try to have a structure which is used to fill information 
>> from
>> a file.
>> And I use UDA to tell : to get this field you need to read 
>> from x
>> to y using a delegate.
>>
>>
>> thanks for your advise
>
> with ldc and dmdfe 2.066 i got:
>
> $ ldc2 test.d
> test.d(40): Error: type Section!((letter) => letter == '>',
> (letter) => letter == '\x0a') has no value
> tuple((Section!((letter) => letter == '>', (letter) => letter ==
> '\x0a')))
> Section!((letter) => letter == '>', (letter) => letter == 
> '\x0a')
> test.d(92): Error: this for countUntil needs to be type Fasta 
> not
> type Parser!(Fasta, ByChunk)
> test.d(99): Error: this for countUntil needs to be type Fasta 
> not
> type Parser!(Fasta, ByChunk)
> test.d(101): Error: this for countUntil needs to be type Fasta
> not type Parser!(Fasta, ByChunk)
> test.d(109): Error: this for countUntil needs to be type Fasta
> not type Parser!(Fasta, ByChunk)
> test.d(43): Error: type Section!((letter) => letter >= 'A' &&
> letter <= 'z', (letter) => letter == '\x0a') has no value
> tuple((Section!((letter) => letter >= 'A' && letter <= 'z',
> (letter) => letter == '\x0a')))
> Section!((letter) => letter >= 'A' && letter <= 'z', (letter) =>
> letter == '\x0a')
> test.d(92): Error: this for countUntil needs to be type Fasta 
> not
> type Parser!(Fasta, ByChunk)
> test.d(99): Error: this for countUntil needs to be type Fasta 
> not
> type Parser!(Fasta, ByChunk)
> test.d(101): Error: this for countUntil needs to be type Fasta
> not type Parser!(Fasta, ByChunk)
> test.d(109): Error: this for countUntil needs to be type Fasta
> not type Parser!(Fasta, ByChunk)
> test.d(7): Error: template instance test.Parser!(Fasta, ByChunk)
> error instantiating


No one can to help about uda?


More information about the Digitalmars-d-learn mailing list