D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4196 - incorrect module report with error in template mixin
Summary: incorrect module report with error in template mixin
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: diagnostic
Depends on:
Blocks:
 
Reported: 2010-05-16 04:12 UTC by strtr
Modified: 2021-03-17 13:52 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description strtr 2010-05-16 04:12:42 UTC
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)
Comment 1 RazvanN 2021-03-17 13:52:07 UTC
This has been fixed in git head.