Skip to content

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

Merged
spytheman merged 5 commits intovlang:masterfrom
yuyi98:improve_assert_info2
Oct 29, 2024
Merged

ast: improve the assert informations (related #22668)#22679
spytheman merged 5 commits intovlang:masterfrom
yuyi98:improve_assert_info2

Conversation

@yuyi98
Copy link
Copy Markdown
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

Comment thread vlib/v/ast/str.v Outdated
Copy link
Copy Markdown
Contributor

@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
@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