Bug 15127 – Parser assertion on wrong code

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-09-29T09:01:00Z
Last change time
2015-09-30T01:36:19Z
Keywords
ice, pull
Assigned to
nobody
Creator
trikko

Comments

Comment #0 by trikko — 2015-09-29T09:01:19Z
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.
Comment #1 by k.hara.pg — 2015-09-29T11:41:02Z
Comment #2 by github-bugzilla — 2015-09-30T01:36:19Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/e9ca9485a59e8d858a7ca7083fb4a222ef69ef8d fix Issue 15127 - Parser assertion on wrong code https://github.com/D-Programming-Language/dmd/commit/eb1c7641af12d67b788bab780c79c16014b49959 Merge pull request #5143 from 9rnsr/fix15127 Issue 15127 - Parser assertion on wrong code