Skip to content

Hovers on LHS of assignments do symbol type lookups#1165

Merged
TwitchBronBron merged 1 commit into
release-1.0.0from
fix_types_being_different_in_same_function
May 9, 2024
Merged

Hovers on LHS of assignments do symbol type lookups#1165
TwitchBronBron merged 1 commit into
release-1.0.0from
fix_types_being_different_in_same_function

Conversation

@markwpearce

@markwpearce markwpearce commented May 9, 2024

Copy link
Copy Markdown
Collaborator

Previously, the type displayed on an assignment was the type of the RHS expression.

This changes that so it does a symbolTable lookup for the token on the LHS.

Symbol table type lookups return a union type of all assigned types for that symbol.

It is bad code style to use the same variable name for different types! We need to add that to BSLint.

Before:
image

After:
image

@TwitchBronBron
TwitchBronBron merged commit 71de8bd into release-1.0.0 May 9, 2024
@TwitchBronBron
TwitchBronBron deleted the fix_types_being_different_in_same_function branch May 9, 2024 13:43
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.

2 participants