Skip to content

Comments

Add conditional type narrowing#150

Draft
heshanpadmasiri wants to merge 4 commits intoballerina-platform:mainfrom
heshanpadmasiri:feat/type-narrowing
Draft

Add conditional type narrowing#150
heshanpadmasiri wants to merge 4 commits intoballerina-platform:mainfrom
heshanpadmasiri:feat/type-narrowing

Conversation

@heshanpadmasiri
Copy link
Member

@heshanpadmasiri heshanpadmasiri commented Feb 18, 2026

Purpose

Resolves #85
Depends on #147

Goals

Describe the solutions that this feature/fix will introduce to resolve the problems described above

Approach

Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.

User stories

Summary of user stories addressed by this change>

Release note

Brief description of the new feature or bug fix as it will appear in the release notes

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter �N/A� plus brief explanation of why there�s no doc impact

Training

Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable

Certification

Type �Sent� when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to certification@wso2.com and NOT pasted in this PR. If there is no impact on certification exams, type �N/A� and explain why.

Marketing

Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable

Automation tests

  • Unit tests

    Code coverage information

  • Integration tests

    Details about the test cases and coverage

Security checks

Samples

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

Related PRs

List any other related PRs

Migrations (if applicable)

Describe migration steps and platforms on which migration has been tested

Test environment

List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested

Learning

Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.

@coderabbitai
Copy link

coderabbitai bot commented Feb 18, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

❌ Patch coverage is 85.64232% with 57 lines in your changes missing coverage. Please review.
✅ Project coverage is 28.48%. Comparing base (8e7b2a8) to head (913b1b8).

Files with missing lines Patch % Lines
semantics/type_narrowing/type_narrowing.go 89.37% 24 Missing and 5 partials ⚠️
ast/expressions.go 20.00% 8 Missing ⚠️
semantics/type_resolver.go 66.66% 2 Missing and 3 partials ⚠️
ast/statements.go 0.00% 4 Missing ⚠️
bir/non_terminator.go 0.00% 4 Missing ⚠️
ast/pretty_printer.go 78.57% 1 Missing and 2 partials ⚠️
ast/node_builder.go 71.42% 1 Missing and 1 partial ⚠️
bir/pretty_print.go 71.42% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #150      +/-   ##
==========================================
+ Coverage   27.90%   28.48%   +0.57%     
==========================================
  Files         254      256       +2     
  Lines       53858    54248     +390     
==========================================
+ Hits        15031    15451     +420     
+ Misses      37890    37848      -42     
- Partials      937      949      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

We can narrow the types of each function concurrently
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add conditional type narrowing

1 participant