Skip to content

give type mismatch hint when checker fails for same value but wrong type#180

Open
shan-96 wants to merge 2 commits intofrankban:masterfrom
shan-96:master
Open

give type mismatch hint when checker fails for same value but wrong type#180
shan-96 wants to merge 2 commits intofrankban:masterfrom
shan-96:master

Conversation

@shan-96
Copy link
Copy Markdown

@shan-96 shan-96 commented Apr 6, 2026

Imagine below test case

type Alias string
const stringAlias Alias = "CONSTANT"
constant := ""CONSTANT

Assert(stringAlias, qt.Equals, constant) // fails

this fails rightfully but there is no hint from the checker that it failed on the type and not value.

This PR add another check for type so we can receive that hint

Copy link
Copy Markdown
Owner

@frankban frankban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you.

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