[Issue 8237] New: Error message with _error_ when using failed type inference in template parameter
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jun 14 02:47:18 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8237
Summary: Error message with _error_ when using failed type
inference in template parameter
Product: D
Version: D1 & D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: clugdbug at yahoo.com.au
--- Comment #0 from Don <clugdbug at yahoo.com.au> 2012-06-14 02:49:29 PDT ---
template warg(R)
{
enum bool warg = false;
}
void blarg()
{
int r = void;
auto s = r ~ "xxx";
bool bbb = warg!(typeof(s));
}
bug.d(11): Error: incompatible types for ((r) ~ ("xxx")): 'int' and 'string'
bug.d(12): Error: expression warg!(_error_) is void and has no value
It shouldn't be trying to instantiate the template at all.
Another consequence of this is that CTFE can get called on a ScopeExp, which
doesn't make sense (and the ScopeExp is an invalid template). This happens for
example when compiling std.range with -debug -unittest.
--
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