Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix Issue 23348 - not handling braceless sub structs in initializers #14455

Merged
merged 1 commit into from
Sep 20, 2022

Conversation

WalterBright
Copy link
Member

Fix another gap in the initializer handling.

subStruct() is turned into a template so it can forward reference subArray().

@WalterBright WalterBright added the Feature:ImportC Pertaining to ImportC support label Sep 19, 2022
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Auto-close Bugzilla Severity Description
23348 normal not handling braceless sub structs in initializers

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#14455"

@@ -727,7 +727,7 @@ extern(C++) Initializer initializerSemantic(Initializer init, Scope* sc, ref Typ
* index = index into ci.initializer, updated
* Returns: struct initializer for this substruct
*/
Initializer subStruct(TypeStruct ts, ref size_t index)
Initializer subStruct()(TypeStruct ts, ref size_t index)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this being turned into a template?

Copy link
Member Author

Choose a reason for hiding this comment

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

subStruct() is turned into a template so it can forward reference subArray()

@RazvanN7 RazvanN7 merged commit 58968d3 into dlang:master Sep 20, 2022
@WalterBright WalterBright deleted the fix23348 branch September 20, 2022 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:ImportC Pertaining to ImportC support Severity:Bug Fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants