You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy gg.Event struct results in runtime memory access error.
Reproduction Steps
import gg
fn main() {
e := gg.Event{}
ev := gg.Event{
...e
}
println(ev)
}
v run .
Expected Behavior
Should print ev
Current Behavior
v2.01JR83TN7DRH9DKT8B2464W4BX.tmp.c:114707: at v__gen__c__Gen_struct_init: RUNTIME ERROR: invalid memory access
v2.01JR83TN7DRH9DKT8B2464W4BX.tmp.c:94321: by v__gen__c__Gen_expr
v2.01JR83TN7DRH9DKT8B2464W4BX.tmp.c:87051: by v__gen__c__Gen_assign_stmt
v2.01JR83TN7DRH9DKT8B2464W4BX.tmp.c:92710: by v__gen__c__Gen_stmt
v2.01JR83TN7DRH9DKT8B2464W4BX.tmp.c:92508: by v__gen__c__Gen_stmts_with_tmp_var
v2.01JR83TN7DRH9DKT8B2464W4BX.tmp.c:92347: by v__gen__c__Gen_stmts
v2.01JR83TN7DRH9DKT8B2464W4BX.tmp.c:103105: by v__gen__c__Gen_gen_fn_decl
v2.01JR83TN7DRH9DKT8B2464W4BX.tmp.c:102636: by v__gen__c__Gen_fn_decl
v2.01JR83TN7DRH9DKT8B2464W4BX.tmp.c:92696: by v__gen__c__Gen_stmt
v2.01JR83TN7DRH9DKT8B2464W4BX.tmp.c:92508: by v__gen__c__Gen_stmts_with_tmp_var
v2.01JR83TN7DRH9DKT8B2464W4BX.tmp.c:92347: by v__gen__c__Gen_stmts
v2.01JR83TN7DRH9DKT8B2464W4BX.tmp.c:91195: by v__gen__c__Gen_gen_file
v2.01JR83TN7DRH9DKT8B2464W4BX.tmp.c:91132: by v__gen__c__cgen_process_one_file_cb
v2.01JR83TN7DRH9DKT8B2464W4BX.tmp.c:33284: by sync__pool__process_in_thread
v2.01JR83TN7DRH9DKT8B2464W4BX.tmp.c:15949: by sync__pool__process_in_thread_thread_wrapper
0x197f682e4 : by ???
0x197f630fc : by ???
^C
Possible Solution
Copying touches resolves the issue.
import gg
fn main() {
e := gg.Event{}
ev := gg.Event{
...e
touches: e.touches
}
println(ev)
}
Describe the bug
Copy
gg.Event
struct results in runtime memory access error.Reproduction Steps
v run .
Expected Behavior
Should print
ev
Current Behavior
Possible Solution
Copying
touches
resolves the issue.Additional Information/Context
No response
V version
V 0.4.10 3cbc141
Environment details (OS name and version, etc.)
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: