1153 – dmd assertion failure

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1153 - dmd assertion failure
Summary: dmd assertion failure
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 All
: P2 normal
Assignee: Walter Bright
URL:
Keywords:
Depends on:
Blocks:
Reported: 2007年04月16日 10:40 UTC by david
Modified: 2014年02月16日 15:21 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 david 2007年04月16日 10:40:05 UTC
interface Foo
{
	void work();
}
template Wrapper(B, alias Func, int func)
{
	alias typeof(&Func) FuncPtr;
 
	private static FuncPtr get_funcptr() { return func; }
} 
 
int main(char[][] args)
{
	auto x = new Wrapper!(Foo, Foo.work, cast(int)(Foo.classinfo.vtbl[0]))();
 
	return 0;
}
Assertion failure: 'e1->type' on line 6377 in file 'expression.c'
abnormal program termination
Comment 1 Thomas Kühne 2007年04月23日 12:57:15 UTC
The code you posted is invalid. Replace "template Wrapper" with "class Wrapper" 
or "struct Wrapper".
Added to DStress as
http://dstress.kuehne.cn/compile/c/classinfo_02_A.d
http://dstress.kuehne.cn/compile/c/classinfo_02_B.d 
Comment 2 Walter Bright 2007年04月27日 14:57:49 UTC
Fixed DMD 1.014


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