www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Parser assertion

reply Andrea Fontana <nospam example.com> writes:
This (wrong!) code:

struct ExampleStruct(S) { }

template ExampleTemplate(K)
{
	enum ExampleTemplate(struct ExampleStruct(K)) = K;
}

void main()
{
	
}

Trigger a parser error:

dmd: parse.c:4226: Dsymbols* 
Parser::parseAutoDeclarations(StorageClass, const utf8_t*): 
Assertion `token.value == TOKassign' failed.


Should I fill a bug?
Sep 29 2015
parent reply Jonathan M Davis <jmdavisProg gmx.com> writes:
On Tuesday, 29 September 2015 at 08:51:42 UTC, Andrea Fontana 
wrote:
 This (wrong!) code:

 struct ExampleStruct(S) { }

 template ExampleTemplate(K)
 {
 	enum ExampleTemplate(struct ExampleStruct(K)) = K;
 }

 void main()
 {
 	
 }

 Trigger a parser error:

 dmd: parse.c:4226: Dsymbols* 
 Parser::parseAutoDeclarations(StorageClass, const utf8_t*): 
 Assertion `token.value == TOKassign' failed.


 Should I fill a bug?
You should always file a bug when the compiler fails an assertion, segfaults, or otherwise crashes. - Jonathan M Davis
Sep 29 2015
parent Andrea Fontana <nospam example.com> writes:
On Tuesday, 29 September 2015 at 08:59:35 UTC, Jonathan M Davis 
wrote:
 On Tuesday, 29 September 2015 at 08:51:42 UTC, Andrea Fontana 
 wrote:
 This (wrong!) code:

 struct ExampleStruct(S) { }

 template ExampleTemplate(K)
 {
 	enum ExampleTemplate(struct ExampleStruct(K)) = K;
 }

 void main()
 {
 	
 }

 Trigger a parser error:

 dmd: parse.c:4226: Dsymbols* 
 Parser::parseAutoDeclarations(StorageClass, const utf8_t*): 
 Assertion `token.value == TOKassign' failed.


 Should I fill a bug?
You should always file a bug when the compiler fails an assertion, segfaults, or otherwise crashes. - Jonathan M Davis
Done: https://issues.dlang.org/show_bug.cgi?id=15127
Sep 29 2015