[Issue 8392] New: DMD sometime fail when using a non static function template within a function template
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jul 15 19:18:42 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8392
Summary: DMD sometime fail when using a non static function
template within a function template
Product: D
Version: D2
Platform: x86_64
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: deadalnix at gmail.com
--- Comment #0 from deadalnix <deadalnix at gmail.com> 2012-07-15 19:18:40 PDT ---
The problem is quite weird, and here the minimal test case I found that
produced the error. You'll need at least 2 modules and function template within
function template.
module a;
struct A {
}
auto fooa(alias handler)(A a) {
return handler(null);
}
module b;
import a;
class B {
this(B);
}
void foob(A a, B b) {
a.fooa!((arg){
return new B(b);
});
}
Both file in the same folder and issuing dmd *.d will cause the following error
:
b.d(9): Error: function b.foob compiler error, parameter 'b', bugzilla 2962?
dmd: glue.c:717: virtual void FuncDeclaration::toObjFile(int): Assertion `0'
failed.
Abandon
I obviously checked bug 2962, but it don't seem to be the same one, even if the
same assert fails.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list