mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
ci: fix broken tests after 322eb81
This commit is contained in:
parent
322eb8197d
commit
988aed0353
@ -5564,7 +5564,7 @@ cause a panic.
|
||||
```v
|
||||
struct Node {
|
||||
a &Node
|
||||
b &Node = 0 // Auto-initialized to nil, use with caution!
|
||||
b &Node = unsafe { nil } // Auto-initialized to nil, use with caution!
|
||||
}
|
||||
|
||||
// Reference fields must be initialized unless an initial value is declared.
|
||||
|
4
vlib/gg/testdata/tweak_circles.vv
vendored
4
vlib/gg/testdata/tweak_circles.vv
vendored
@ -5,7 +5,7 @@ import gx
|
||||
|
||||
struct App {
|
||||
mut:
|
||||
gg &gg.Context = 0
|
||||
gg &gg.Context = unsafe { nil }
|
||||
radius f64 = 10.0
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ fn on_event(e &gg.Event, mut app App) {
|
||||
fn frame(mut app App) {
|
||||
app.gg.begin()
|
||||
app.gg.draw_circle_empty(150, 150, f32(app.radius), gx.blue)
|
||||
app.gg.draw_text(20, 20, 'radius: $app.radius')
|
||||
app.gg.draw_text(20, 20, 'radius: ${app.radius}')
|
||||
// app.gg.draw_text(20, 50, 'circle_segment_size: $circle_segment_size')
|
||||
app.gg.end()
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import term.ui as tui
|
||||
|
||||
struct App {
|
||||
mut:
|
||||
tui &tui.Context = 0
|
||||
tui &tui.Context = unsafe { nil }
|
||||
}
|
||||
|
||||
fn event(e &tui.Event, x voidptr) {
|
||||
|
@ -30,7 +30,7 @@ fn test_generics_assign_generics_struct() {
|
||||
struct Node[T] {
|
||||
pub mut:
|
||||
val T
|
||||
next &Node[T] = 0
|
||||
next &Node[T] = unsafe { nil }
|
||||
}
|
||||
|
||||
fn new[T]() &Node[T] {
|
||||
|
@ -128,7 +128,7 @@ fn test_generics_return_generic_struct_from_fn() {
|
||||
struct ListNode[T] {
|
||||
pub mut:
|
||||
val T
|
||||
next &ListNode[T] = 0
|
||||
next &ListNode[T] = unsafe { nil }
|
||||
}
|
||||
|
||||
fn (mut node ListNode[T]) test() &ListNode[T] {
|
||||
|
@ -1,12 +1,12 @@
|
||||
struct List[T] {
|
||||
pub mut:
|
||||
head &ListNode[T] = 0
|
||||
head &ListNode[T] = unsafe { nil }
|
||||
}
|
||||
|
||||
struct ListNode[T] {
|
||||
pub mut:
|
||||
value T
|
||||
next &ListNode[T] = 0
|
||||
next &ListNode[T] = unsafe { nil }
|
||||
}
|
||||
|
||||
fn list_new[T]() List[T] {
|
||||
|
@ -8,7 +8,7 @@ mut:
|
||||
struct ListNode[T] {
|
||||
mut:
|
||||
val T
|
||||
next &ListNode[T] = 0
|
||||
next &ListNode[T] = unsafe { nil }
|
||||
}
|
||||
|
||||
fn create[T](arr []T) &List[T] {
|
||||
|
@ -10,13 +10,13 @@ fn test_nested_generic_struct_init() {
|
||||
|
||||
struct List[T] {
|
||||
pub mut:
|
||||
head &ListNode[T] = 0
|
||||
head &ListNode[T] = unsafe { nil }
|
||||
}
|
||||
|
||||
struct ListNode[T] {
|
||||
pub mut:
|
||||
value T
|
||||
next &ListNode[T] = 0
|
||||
next &ListNode[T] = unsafe { nil }
|
||||
}
|
||||
|
||||
pub fn list_new[T]() &List[T] {
|
||||
|
@ -1,12 +1,12 @@
|
||||
struct Node[T] {
|
||||
mut:
|
||||
data T
|
||||
next &Node[T] = 0
|
||||
next &Node[T] = unsafe { nil }
|
||||
}
|
||||
|
||||
struct SinglyLinkedList[T] {
|
||||
mut:
|
||||
first_node &Node[T] = 0
|
||||
first_node &Node[T] = unsafe { nil }
|
||||
}
|
||||
|
||||
fn init_singlylinkedlist[T](nodes ...Node[T]) SinglyLinkedList[T] {
|
||||
|
@ -1,8 +1,8 @@
|
||||
struct Abc {
|
||||
mut:
|
||||
vptr voidptr
|
||||
vptrptr &voidptr = 0
|
||||
bptr &u8 = 0
|
||||
vptrptr &voidptr = unsafe { nil }
|
||||
bptr &u8 = unsafe { nil }
|
||||
cptr &char = c'abcdef'
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user