[Issue 2969] New: ICE on const declaration
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue May 12 18:32:14 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2969
Summary: ICE on const declaration
Product: D
Version: 2.030
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: mikolalysenko at gmail.com
Try compiling following snippet:
module sound;
import std.math;
struct Sound
{
float time;
float delegate(float) func;
this(float delegate(float) f, float t)
{
time = t;
func = f;
}
Sound opAdd(const(Sound) other)
{
return Sound(
(float t){
return func(t) + other.func(t);
}, fmax(time, other.time));
}
Sound opCat(const(Sound) other)
{
return Sound(
(float t){
if(t <= time)
return func(t);
return other.func(t - time);
}, time + other.time);
}
}
Gives the error message:
Internal error: ../ztc/cod4.c 353
--
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