The following code (counting lines of given file) fails (Error: Access Violation) with 0.173 but works fine with 0.172:
import std.stdio;
import std.stream;
int main(char[][] args) {
BufferedFile inFile = new BufferedFile();
try {
inFile.open( args[ 1 ], FileMode.In ) ;
// count the lines
int max;
foreach ( ulong n, char[] line; inFile ) {
max = n;
}
printf( "%d", max );
} finally {
inFile.close();
}
return 0;
}
Comment #1 by StefanLiebig — 2006-11-15T00:21:18Z
The problem does no longer appear with 0.174.
Comment #2 by matti.niemenmaa+dbugzilla — 2006-11-15T02:39:04Z
I suppose the bug report can go, then.
Comment #3 by dlang-bot — 2020-09-02T07:09:25Z
dlang-community/dfmt pull request #505 "Keep line break after function attributes" was merged into master:
- e6e52cd4d13b77368fef1a78f7ae451a6fcc543e by Eugen Wissner:
Keep line break after function attributes
Fixes #504.
https://github.com/dlang-community/dfmt/pull/505