ballerina-lang icon indicating copy to clipboard operation
ballerina-lang copied to clipboard

Add type checking changes to allow annotations for each member in a tuple

Open ushirask opened this issue 2 years ago • 3 comments

Purpose

Allow annotations to be added to each member in a tuple

Fixes #36390

Approach

Describe how you are implementing the solutions along with the design details.

Samples

Provide high-level details about the samples related to this feature.

Remarks

List any other known issues, related PRs, TODO items, or any other notes related to the PR.

Check List

  • [ ] Read the Contributing Guide
  • [ ] Updated Change Log
  • [ ] Checked Tooling Support (#<Issue Number>)
  • [ ] Added necessary tests
    • [ ] Unit Tests
    • [ ] Spec Conformance Tests
    • [ ] Integration Tests
    • [ ] Ballerina By Example Tests
  • [ ] Increased Test Coverage
  • [ ] Added necessary documentation
    • [ ] API documentation
    • [ ] Module documentation in Module.md files
    • [ ] Ballerina By Examples

ushirask avatar Jun 21 '22 07:06 ushirask

Shall we add semantic validation tests in this PR itself?

MaryamZi avatar Jun 27 '22 03:06 MaryamZi

Codecov Report

Base: 76.48% // Head: 76.51% // Increases project coverage by +0.02% :tada:

Coverage data is based on head (a1d5258) compared to base (5cc1936). Patch coverage: 91.59% of modified lines in pull request are covered.

Additional details and impacted files
@@                    Coverage Diff                    @@
##             annot-tuple-members   #36638      +/-   ##
=========================================================
+ Coverage                  76.48%   76.51%   +0.02%     
- Complexity                 53249    53290      +41     
=========================================================
  Files                       3386     3387       +1     
  Lines                     199869   200025     +156     
  Branches                   25815    25829      +14     
=========================================================
+ Hits                      152864   153040     +176     
+ Misses                     38422    38409      -13     
+ Partials                    8583     8576       -7     
Impacted Files Coverage Δ
...ava/io/ballerina/runtime/internal/TypeChecker.java 78.53% <ø> (+0.19%) :arrow_up:
...o/ballerina/compiler/api/impl/TypeParamFinder.java 41.55% <0.00%> (ø)
...va/org/wso2/ballerinalang/compiler/bir/BIRGen.java 92.33% <ø> (-0.13%) :arrow_down:
...ternal/parser/tree/STMemberTypeDescriptorNode.java 68.75% <ø> (ø)
...compiler/syntax/tree/MemberTypeDescriptorNode.java 100.00% <ø> (ø)
...nalang/compiler/tree/types/BLangTupleTypeNode.java 60.00% <20.00%> (-6.67%) :arrow_down:
...iler/semantics/analyzer/ConstantValueResolver.java 86.85% <42.85%> (-0.33%) :arrow_down:
...llerinalang/compiler/desugar/ParameterDesugar.java 75.86% <50.00%> (-0.14%) :arrow_down:
...2/ballerinalang/compiler/bir/emit/TypeEmitter.java 41.36% <75.00%> (ø)
...compiler/semantics/analyzer/IsolationAnalyzer.java 84.86% <75.00%> (ø)
... and 47 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Jul 18 '22 09:07 codecov[bot]

The base branch seems to be having conflicts with master. Can you please send a separate PR to sync it?

MaryamZi avatar Oct 05 '22 03:10 MaryamZi

The base branch seems to be having conflicts with master. Can you please send a separate PR to sync it?

@ushirask, this wasn't done, was it?

The build also seems to be failing. Please check/fix.

MaryamZi avatar Oct 24 '22 05:10 MaryamZi

@ushirask, please fix the build.

MaryamZi avatar Nov 02 '22 04:11 MaryamZi

Had a chat with @MaryamZi on missing symbol information.

We need location information of the tuple type inside the variable symbol and name.pos.

dulajdilshan avatar Dec 14 '22 09:12 dulajdilshan

Had a chat with @MaryamZi on missing symbol information.

We need location information of the tuple type inside the variable symbol and name.pos.

@ushirask Can you please have a look?

dulajdilshan avatar Dec 21 '22 04:12 dulajdilshan