Internal AV with Windows 7 64-bit and Win10. This seems to be a 2.071 regression about package access. 2.071.2 beta3 doesn't fix it. Reduced code is here. COMMAND: dmd test.d imp.d RESULT: object.Error@(0): Access Violation ---------------- 0x00402502 0x0108B660 0x0108C100 CODE: *imp.d module pkg.imp; package void pkgFunc() { } // package access needs *test.d module pkg.test; void main() { //import pkg.imp; // this works enum d = (){ import pkg.imp; // this crashes pkgFunc(); }; }
This looks like Issue 16348, but is NOT. 2.071.2 beta4 doesn't fix.
(In reply to jiki from comment #1) > This looks like Issue 16348, but is NOT. > 2.071.2 beta4 doesn't fix. It's another instance of Issue 16384, just a different place where the scope gets created without scope symbol. https://github.com/dlang/dmd/pull/6128
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/0c9374cec813f8b29483bebd5a659be55958c299 fix Issue 16460 - ICE for package visibility check in function literal - fixed by skipping symbol-less scopes when establishing scope for FuncDeclaration - symbol-less scopes like Scope.startCTFE and FuncExp scopes don't require a symbol table (and thus don't create a scopesym) https://github.com/dlang/dmd/commit/8679fd9b9b5f401f834047cd0c14ebd338566cfd Merge pull request #6128 from MartinNowak/fix16460 fix Issue 16460 - ICE for package visibility check in function literal
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/0c9374cec813f8b29483bebd5a659be55958c299 fix Issue 16460 - ICE for package visibility check in function literal https://github.com/dlang/dmd/commit/8679fd9b9b5f401f834047cd0c14ebd338566cfd Merge pull request #6128 from MartinNowak/fix16460
Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/0c9374cec813f8b29483bebd5a659be55958c299 fix Issue 16460 - ICE for package visibility check in function literal https://github.com/dlang/dmd/commit/8679fd9b9b5f401f834047cd0c14ebd338566cfd Merge pull request #6128 from MartinNowak/fix16460