D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 21792 - Enum using itself as base type crashes dmd
Summary: Enum using itself as base type crashes dmd
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-02 19:51 UTC by moonlightsentinel
Modified: 2021-04-04 16:30 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description moonlightsentinel 2021-04-02 19:51:13 UTC
The following code makes dmd crash with a stack overflow:

enum Bar : Bar
{
    a
}
Comment 1 Dlang Bot 2021-04-04 16:30:11 UTC
dlang/dmd pull request #12347 "Fix 21792 - Enum using itself as base type crashes dmd " was merged into master:

- bb0e4804f697d473c202a143bb8e20d7891f9e42 by MoonlightSentinel:
  Fix 21792 - Enum using itself as base type crashes dmd
  
  Run semantic on the base type to resolve all missing properties
  and to detect invalid forward references.

https://github.com/dlang/dmd/pull/12347