[Issue 3781] ICE(interpret.c): mixin non-CTFE function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 9 00:25:06 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3781
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code, patch
CC| |clugdbug at yahoo.com.au
Version|unspecified |1.055
Severity|normal |regression
--- Comment #1 from Don <clugdbug at yahoo.com.au> 2010-02-09 00:25:05 PST ---
Reduced test case for test suite:
-----
void badvariadic(...) {}
static assert(!is(typeof(mixin(badvariadic()))));
---
PATCH: interpret.c line 118. The check for C-style variadics failed in the case
where there were no non-variadic parameters.
TypeFunction *tf = (TypeFunction *)tb;
Type *tret = tf->next->toBasetype();
- if (tf->varargs && arguments && parameters && arguments->dim !=
parameters->dim)
+ if (tf->varargs && arguments && (parameters && arguments->dim !=
parameters->dim) || (!parameters && arguments->dim))
{ cantInterpret = 1;
error("C-style variadic functions are not yet implemented in CTFE");
return NULL;
}
--
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