Visual D access violation when using static foreach

Rainer Schuetze via Digitalmars-d-ide digitalmars-d-ide at puremagic.com
Fri Sep 1 14:43:26 PDT 2017



On 01.09.2017 21:45, EntangledQuanta wrote:
> The following code, when building in Visual D outputs an access violation:
> 
> alias I(A...) = A;
> 
> interface Foo {
>          static foreach(T; I!(int, float))
>                  void set(T t); // define virt funcs for a list of types
> }
> 
> class Ass : Foo {
>          static foreach(T; I!(int, float))
>                  void set(T t) {
>                          // simplement
>                  }
> }
> 
> void main()
> {
> 
> }
> 
> but when compiling from the command line directly works fine.
> 

It seems "static foreach" doesn't interact well with generating a JSON 
file with -X. You can disable this in the project configuration page for 
"Documentation".

Please also consider filing a bug report against dmd at 
https://issues.dlang.org/


More information about the Digitalmars-d-ide mailing list