Skip to content

Typechecker improvements: bug fixes, better error messages, dead code removal#1619

Open
Eugeny48 wants to merge 10 commits into
masterfrom
typechecker-improvements
Open

Typechecker improvements: bug fixes, better error messages, dead code removal#1619
Eugeny48 wants to merge 10 commits into
masterfrom
typechecker-improvements

Conversation

@Eugeny48

@Eugeny48 Eugeny48 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

This PR improves the Flow9 typechecker in three areas:

Bug fixes:

  • Fixed incorrect type inference when if-else branches return different struct types from the same union — the typechecker was widening the result type by merging inner type parameters instead of preserving the concrete branch types. This affected real code like wigi2xliff_light.flow.

Better error messages:

  • typeverifyFiFunctionDec and typeverifyFiGlobalVar now report the actual type mismatch (body/value type vs declared type) instead of just saying "in function 'X'" with no details about what went wrong.

Dead code removal:

  • Removed the findCommonFUnion function which was unused.

@Eugeny48 Eugeny48 force-pushed the typechecker-improvements branch from c51f91c to b42f187 Compare June 8, 2026 12:07
@Eugeny48

Copy link
Copy Markdown
Contributor Author

It's ready to merge, just waiting for this PR https://git.area9lyceum.com/Lyceum/lyceum/pulls/10716

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.

1 participant