[Issue 1969] New: Internal error: ..\ztc\cod1.c 1662
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Apr 2 07:42:10 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1969
Summary: Internal error: ..\ztc\cod1.c 1662
Product: D
Version: 2.012
Platform: PC
OS/Version: Windows
Status: NEW
Severity: minor
Priority: P3
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: sardonicpresence at gmail.com
The following code results in an Internal error in DMD 2.012:
////////
struct Foo { }
struct Bar
{
public Foo opSub(Bar other)
{
return Foo();
}
}
void main()
{
// Removing the following const eliminates the error
const Foo test = Foo();
// Causes the error as (Foo + Foo) is undefined
auto result = test + (Bar() - Bar());
auto ok1 = test + test; // No error
auto ok2 = test + Foo(); // No error
}
////////
--
More information about the Digitalmars-d-bugs
mailing list