v
v copied to clipboard
Builder error
Describe the bug
Builder error : warning: cast between pointer and integer of different size error: pointer expected
Expected Behavior
This is the SSCCE that I made to reproduce the builder error (it's not part of my code I discovered it by mistake)
Current Behavior
PS C:\Users\PACHECON\_cv> v run "c:\Users\PACHECON\_cv\test_file.v"
==================
C:/Users/PACHECON/AppData/Local/Temp/v_0/test_file.597314614221110120.tmp.c:7599: warning: cast between pointer and integer of different size
C:/Users/PACHECON/AppData/Local/Temp/v_0/test_file.597314614221110120.tmp.c:12461: error: pointer expected
==================
(Use `v -cg` to print the entire error message)
builder error:
==================
C error. This should never happen.
Reproduction Steps
[heap]
struct Particle{
}
[heap]
struct App {
mut:
list_opti [][]&Particle
}
fn (mut app App) init_opti_list(){
for mut liste in app.list_opti{
if liste != []{
liste.clear()
}
}
}
fn main() {
mut app := &App{
list_opti: [][]&Particle{len:10, init:[]&Particle{}}
}
app.init_opti_list()
}
Possible Solution
No response
Additional Information/Context
No response
V version
Current V version: V 0.3.3 864e199, timestamp: 2023-02-27 21:48:05 +0200
Environment details (OS name and version, etc.)
OS: windows, Microsoft Windows 10 Education v19045 64 bits
good thankyou