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

Introduce closures for record default values #33771

Closed
MaryamZi opened this issue Nov 11, 2021 · 0 comments · Fixed by #40579
Closed

Introduce closures for record default values #33771

MaryamZi opened this issue Nov 11, 2021 · 0 comments · Fixed by #40579
Assignees
Labels
Reason/Other None of the other reasons. Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/NewFeature Type/Task

Comments

@MaryamZi
Copy link
Member

Description:
$title, in line with the spec.

A default-expression is an expression that specifies a default value for the field, which is used when the record type descriptor is used to construct a mapping value but no value is specified explicitly for the field. The type descriptor contains a 0-argument function closure for each default value. The closure is created from the expression when the type descriptor is resolved. The expression must meet the requirements for an isolated function. The closure is evaluated to create a field value each time the default is used in the construction of a mapping value. The default value does not affect the type described by the type descriptor.

Once this is fixed, we can rewrite inclusion so that it fixes #32012.

@MaryamZi MaryamZi added Type/Task Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. labels Nov 11, 2021
@MaryamZi MaryamZi added the Points/5 Equivalent to five day effort label Jul 4, 2022
@gimantha gimantha added this to the 2201.3.0 milestone Jul 14, 2022
@ushirask ushirask added Points/3 Equivalent to three days effort and removed Points/5 Equivalent to five day effort labels Jul 14, 2022
@chiranSachintha chiranSachintha modified the milestones: 2201.3.0, 2201.4.0 Oct 3, 2022
@chiranSachintha chiranSachintha moved this from BackLog to PR Sent in Ballerina Team Main Board Nov 24, 2022
@MaryamZi MaryamZi moved this from PR Sent to On Hold in Ballerina Team Main Board Feb 2, 2023
@chiranSachintha chiranSachintha modified the milestones: 2201.4.0, 2201.5.0 Feb 28, 2023
@rdulmina rdulmina removed this from the 2201.5.0 milestone Mar 22, 2023
@chiranSachintha chiranSachintha removed the Points/3 Equivalent to three days effort label Apr 6, 2023
@chiranSachintha chiranSachintha added the Points/1.5 Equivalent to one and a half day effort label Apr 6, 2023
@chiranSachintha chiranSachintha moved this from BackLog to Planned for Sprint in Ballerina Team Main Board Apr 17, 2023
@dulajdilshan dulajdilshan moved this from Planned for Sprint to In Progress in Ballerina Team Main Board Apr 27, 2023
@chiranSachintha chiranSachintha removed the Points/1.5 Equivalent to one and a half day effort label Apr 27, 2023
@chiranSachintha chiranSachintha moved this from In Progress to PR Sent in Ballerina Team Main Board May 9, 2023
@chiranSachintha chiranSachintha moved this from PR Sent to In Progress in Ballerina Team Main Board Jun 15, 2023
@chiranSachintha chiranSachintha moved this from In Progress to PR Sent in Ballerina Team Main Board Sep 5, 2023
@github-project-automation github-project-automation bot moved this from PR Sent to Done in Ballerina Team Main Board Dec 6, 2023
@chiranSachintha chiranSachintha added the Reason/Other None of the other reasons. label Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reason/Other None of the other reasons. Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/NewFeature Type/Task
Projects
Archived in project
5 participants