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: bugzi...@digitalmars.com
        ReportedBy: mikolalyse...@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: -------

Reply via email to