Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ast: improve the assert informations (related #22668) #22679

Merged
merged 5 commits into from
Oct 29, 2024

Conversation

yuyi98
Copy link
Member

@yuyi98 yuyi98 commented Oct 28, 2024

This PR improve the assert informations (related #22668).

type Sum = int | string

fn main() {
   assert Sum(1) == Sum(2)
}

PS D:\Test\v\tt1> v run .
.\\tt1.v:4: FAIL: fn main.main: assert Sum(1) == Sum(2)
  left value: Sum(1)
  right value: Sum(2)
V panic: Assertion failed...
v hash: 9c72d94
C:/Users/yuyi9/AppData/Local/Temp/v_0/tt1.01JB994DG71BPHW0GK9AEFXYZS.tmp.c:7314: at _v_panic: Backtrace
C:/Users/yuyi9/AppData/Local/Temp/v_0/tt1.01JB994DG71BPHW0GK9AEFXYZS.tmp.c:13684: by main__main
C:/Users/yuyi9/AppData/Local/Temp/v_0/tt1.01JB994DG71BPHW0GK9AEFXYZS.tmp.c:13721: by wmain
00466ea8 : by ???
0046700b : by ???
7ffe207e259d : by ???

Huly®: V_0.6-21128

Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

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

Excellent work.
Thank you for fixing the other cases as well 🙇🏻‍♂️ .

@spytheman spytheman merged commit 45cbf4f into vlang:master Oct 29, 2024
78 checks passed
@yuyi98 yuyi98 deleted the improve_assert_info2 branch October 29, 2024 05:29
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