-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SP004: implement initialize list translation to ctor
This is the first change to implement part of SP004, what this change does: 1. We synthesize a member-wise constructor for each struct follow the rules described in SP004. 2. Add logic to translate the initialize list to constructor invoke TODO: what needs to be done next 1. We didn't fill the body of the synthesized constructor - This is relative easy task. 2. The fall back to legacy initialize list logic is not done - I found out that it's straight forward to put this logic after ResolveInvoke() call, because after ResolveInvoke() we will need to do a final 'coerce()' check to determine whether the candidate is applicable to use. If that fails, we can do the C-Style struct check and fall back to legacy logic. 3. Should we enable this for stdlib as well? - Our stdlib has some syntax that external users cannot use, so whether this change could break anything is unknown for now. It needs some extra effort to investigate and debugging the potential compile issue.
- Loading branch information
1 parent
68c2834
commit c759f4d
Showing
5 changed files
with
371 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.