Bug 4981 – Assertion failure: 'precedence[e->op] != PREC_zero' on line 816 in file 'expression.c'
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-10-02T21:26:00Z
Last change time
2010-10-07T07:25:11Z
Assigned to
nobody
Creator
2korden
Comments
Comment #0 by 2korden — 2010-10-02T21:26:47Z
shared class A
{
void funcProto()
{
}
void func(shared(FuncType) func)
{
}
}
alias typeof(&A.init.funcProto) FuncType;
shared class B : A
{
void foo()
{
B* b;
shared(FuncType) o = b.func = &b.bar;
//auto o = b.func = &b.bar;
}
void bar()
{
}
}
Assertion failure: 'precedence[e->op] != PREC_zero' on line 816 in file 'expression.c'
abnormal program termination
Replacing "shared(FuncType) o" with "auto o" (line 20) adds additional error message:
test.d(20): Error: variable test.B.foo.o voids have no value
Comment #1 by clugdbug — 2010-10-07T07:25:11Z
The ICE is a duplicate of bug 4926. You're also seeing a poor error message: I've created bug 5010 for that.
*** This issue has been marked as a duplicate of issue 4926 ***