Skip to content

Conversation

@Scheremo
Copy link
Contributor

@Scheremo Scheremo commented Nov 4, 2025

Previously, the compiler could crash when encountering a specialized class extending and specializing a generic class, since no classdecl would be lowered for the generic class. This commit enforces the emission of a classdecl for the specialized version of the generic base class in such a case.

@Scheremo Scheremo marked this pull request as ready for review November 4, 2025 14:07
Copy link
Contributor

@fabianschuiki fabianschuiki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Would it make sense to add a test where the GenericBar is defined after the SpecializedFoo? IIRC, SV allows for that, and I've managed to code up stuff in the past that would fail if it saw a use before a definition.

@Scheremo
Copy link
Contributor Author

Scheremo commented Nov 5, 2025

LGTM! Would it make sense to add a test where the GenericBar is defined after the SpecializedFoo? IIRC, SV allows for that, and I've managed to code up stuff in the past that would fail if it saw a use before a definition.

That would be news to me! Slang throws an error for use before declaration which ever way I try 😅

Previously, the compiler could crash when encountering a specialized class extending and
specializing a generic class, since no classdecl would be lowered for the generic class.
This commit enforces the emission of a classdecl for the specialized version of the generic base
class in such a case.
@Scheremo Scheremo force-pushed the pr-class-inheritance-fix branch from c531ea6 to c04f002 Compare November 5, 2025 06:11
@Scheremo Scheremo merged commit beab708 into llvm:main Nov 5, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants