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

[c#] create implicit ctor for field inits #5203

Merged
merged 2 commits into from
Jan 6, 2025

Conversation

xavierpinho
Copy link
Contributor

Fields with initial assignments are now moved to the <init> (constructor) method, even when a default constructor is not explicitly declared. Previously, this behavior was supported only for explicitly declared constructors. This patch applies exclusively to dynamic fields -- support for moving static field initializations will be addressed in a future PR.

@xavierpinho xavierpinho added the c# Relates to csharpsrc2cpg label Jan 6, 2025
@xavierpinho xavierpinho force-pushed the xavierp/csharp-ctor-creation branch from a8b16ea to 39adcec Compare January 6, 2025 14:07
@xavierpinho xavierpinho merged commit 76dd74a into master Jan 6, 2025
5 checks passed
@xavierpinho xavierpinho deleted the xavierp/csharp-ctor-creation branch January 6, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c# Relates to csharpsrc2cpg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants