www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4196] New: incorrect module report with error in template mixin

http://d.puremagic.com/issues/show_bug.cgi?id=4196

           Summary: incorrect module report with error in template mixin
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: strtr despam.it



module main;
import t_def;
class C{ mixin T!(); }
void main(){
    C c = new C();
    c.func();
}
--
module t_def;

template T()
{
    int[] arr;
    public void func()
    {
        arr[1] = 42;
    }
}
--
run main.exe
Error: ArrayBoundsError main.d(8)
should be t_def.d(8)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 16 2010