D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4981 - Assertion failure: 'precedence[e->op] != PREC_zero' on line 816 in file 'expression.c'
Summary: Assertion failure: 'precedence[e->op] != PREC_zero' on line 816 in file 'expr...
Status: RESOLVED DUPLICATE of issue 4926
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-02 21:26 UTC by Koroskin Denis
Modified: 2010-10-07 07:25 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Koroskin Denis 2010-10-02 21:26:47 UTC
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 Don 2010-10-07 07:25:11 UTC
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 ***