Regression?

Sebastiaan Koppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Sep 6 22:07:56 PDT 2015


This used to work in older compiler (might have been v2.067 or 
v2.066, not older).

```
#!rdmd

import std.stdio;
import std.json;
import std.algorithm;

void main() {
	auto ls = 
File("../languages.json","r").byLineCopy().joiner.parseJSON();
}
```

Error: c:\D\dmd2\windows\bin\..\..\src\phobos\std\json.d(639): 
Error: variable std.json.parseJSON!(Result).parseJSON.json has 
scoped destruction, cannot build closure


More information about the Digitalmars-d-learn mailing list