digitalmars.D.learn - UDA failling to build when using delegate
- bioinfornatics (7/7) Nov 03 2014 Dear,
- bioinfornatics (32/40) Nov 03 2014 with ldc and dmdfe 2.066 i got:
- bioinfornatics (2/54) Nov 04 2014 No one can to help about uda?
- =?UTF-8?B?QWxpIMOHZWhyZWxp?= (10/12) Nov 04 2014 You have this line:
- bioinfornatics (5/19) Nov 05 2014 Thanks Ali
- bioinfornatics (6/33) Nov 05 2014 Oh that is ok, I replaced
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
Nov 03 2014
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 advisewith 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
Nov 03 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:No one can to help about uda?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 advisewith 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
Nov 04 2014
On 11/04/2014 01:58 PM, bioinfornatics wrote:You have this line: Section!(/* ... */) Although that is a type name, there is a bug somewhere and sometimes you have to use a 'value' as a UDA. (We talked about this recently but I don't remember the details.) So make it an object so that it is a 'value': Section!(/* ... */)() (You have another instance of that.) You will have to deal with the next set of error messages now. :-/ Alitest.d(40): Error: type Section!((letter) => letter == '>', (letter) => letter == '\x0a') has no value
Nov 04 2014
On Tuesday, 4 November 2014 at 22:06:03 UTC, Ali Çehreli wrote:On 11/04/2014 01:58 PM, bioinfornatics wrote:Thanks Ali If i understand well, that is a dmdfe bug ? i yes that is weird as using Section!(/* ... */)() give to me something type of void then I can't filter to the desired udaYou have this line: Section!(/* ... */) Although that is a type name, there is a bug somewhere and sometimes you have to use a 'value' as a UDA. (We talked about this recently but I don't remember the details.) So make it an object so that it is a 'value': Section!(/* ... */)() (You have another instance of that.) You will have to deal with the next set of error messages now. :-/ Alitest.d(40): Error: type Section!((letter) => letter == '>', (letter) => letter == '\x0a') has no value
Nov 05 2014
On Wednesday, 5 November 2014 at 21:57:42 UTC, bioinfornatics wrote:On Tuesday, 4 November 2014 at 22:06:03 UTC, Ali Çehreli wrote:Oh that is ok, I replaced static if(is(attr : Section!T, T...)) by static if(is(Section!(T, T)))On 11/04/2014 01:58 PM, bioinfornatics wrote:Thanks Ali If i understand well, that is a dmdfe bug ? i yes that is weird as using Section!(/* ... */)() give to me something type of void then I can't filter to the desired udaYou have this line: Section!(/* ... */) Although that is a type name, there is a bug somewhere and sometimes you have to use a 'value' as a UDA. (We talked about this recently but I don't remember the details.) So make it an object so that it is a 'value': Section!(/* ... */)() (You have another instance of that.) You will have to deal with the next set of error messages now. :-/ Alitest.d(40): Error: type Section!((letter) => letter == '>', (letter) => letter == '\x0a') has no value
Nov 05 2014