[Issue 6902] New: Different "pure nothrow int()" types
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 7 01:44:29 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6902
Summary: Different "pure nothrow int()" types
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: verylonglogin.reg at gmail.com
--- Comment #0 from Denis <verylonglogin.reg at gmail.com> 2011-11-07 12:43:54 MSK ---
---
void main() {
static assert(is(typeof({
return int.init; // int, long, real, etc.
})));
int f() pure nothrow { assert(0); }
alias int T() pure nothrow;
static if(is(typeof(&f) DT == delegate)) {
static assert(is(DT* == T*)); // ok
// Error: static assert (is(pure nothrow int() == pure nothrow int()))
is false
static assert(is(DT == T));
}
}
---
--
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