4912 – ICE [expToCBuffer] compile-time access to non-existent AA member

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4912 - ICE [expToCBuffer] compile-time access to non-existent AA member
Summary: ICE [expToCBuffer] compile-time access to non-existent AA member
Status: RESOLVED DUPLICATE of issue 4926
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
Reported: 2010年09月21日 17:50 UTC by Shin Fujishiro
Modified: 2010年09月23日 14:01 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Shin Fujishiro 2010年09月21日 17:50:36 UTC
Yet another PREC_zero assertion failure in expToCBuffer().
enum aa = [ "zero": 0 ];
static assert(aa["one"] == 1);
% dmd -o- -c test.d
Assertion failed: (precedence[e->op] != PREC_zero), function expToCBuffer, file expression.c, line 816.
Patch against dmd r680:
====================
diff --git src/parse.c src/parse.c
index 61b1c2a..4800474 100644
--- src/parse.c
+++ src/parse.c
@@ -6273,6 +6273,7 @@ void initPrecedence()
 precedence[TOKnull] = PREC_primary;
 precedence[TOKstring] = PREC_primary;
 precedence[TOKarrayliteral] = PREC_primary;
+ precedence[TOKassocarrayliteral] = PREC_primary;
 precedence[TOKtypeid] = PREC_primary;
 precedence[TOKis] = PREC_primary;
 precedence[TOKassert] = PREC_primary;
Comment 1 Shin Fujishiro 2010年09月23日 14:01:53 UTC
*** This issue has been marked as a duplicate of issue 4926 ***


AltStyle によって変換されたページ (->オリジナル) /