2241 – DMD abort

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 2241 - DMD abort
Summary: DMD abort
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Linux
: P2 normal
Assignee: Walter Bright
URL:
Keywords:
Depends on:
Blocks:
Reported: 2008年07月24日 00:28 UTC by MIURA Masahiro
Modified: 2015年06月09日 01:20 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description MIURA Masahiro 2008年07月24日 00:28:30 UTC
DMD aborts with this:
---- cut here ----
% cat dmdabort.d
import std.file;
string find_file(string directory)
{
 char[] result;
 foreach (string path; dirEntries(directory, SpanMode.shallow)) {
 string fullpath = std.file.join(directory, path);
 // ...
 }
 return cast(string)result;
}
void main(string[] args)
{
 // writefln("%s", find_file("."));
}
% dmd dmdabort.d
dmd: expression.c:5222: virtual Expression* DotIdExp::semantic(Scope*): Assertion `0' failed.
zsh: abort dmd dmdabort.d
%
---- cut here ----
Comment out the "string fullpath =" line and it compiles.
DMD 2.017 on Linux.
Comment 1 Walter Bright 2008年09月03日 01:35:55 UTC
Fixed dmd 1.035 and 2.019


AltStyle によって変換されたページ (->オリジナル) /