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
The V program to successfully compile and start a veb server on 8080
Current Behavior
tristan@desktop:~/programming/v_bug_8.12.2025$ v run .
main.v:50:2: warning: unused variable: user_id
48 |
49 | // Compiler Bug
50 | user_id := sql app.db {
| ~~~~~~~
51 | insert new_user into User
52 | } or { panic(error) }
V panic: table.sym: invalid type (typ=ast.Type(0x0 = 0) idx=0). Compiler bug. This should never happen. Please report the bug using v bug file.v.
v hash: db66120
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:19356: at _v_panic: Backtrace
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:36966: by v__ast__default_table_panic_handler
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:36972: by v__ast__Table_panic
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:37671: by v__ast__Table_sym
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:48976: by v__gen__c__Gen_get_table_name_by_struct_type
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:47532: by v__gen__c__Gen_sql_stmt_line
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:47873: by v__gen__c__Gen_write_orm_insert_with_last_ids
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:47731: by v__gen__c__Gen_write_orm_insert
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:47518: by v__gen__c__Gen_sql_insert_expr
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:30246: by v__gen__c__Gen_expr
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:22810: by v__gen__c__Gen_assign_stmt
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:28625: by v__gen__c__Gen_stmt
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:28393: by v__gen__c__Gen_stmts_with_tmp_var
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:28232: by v__gen__c__Gen_stmts
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:39289: by v__gen__c__Gen_gen_fn_decl
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:38826: by v__gen__c__Gen_fn_decl
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:28607: by v__gen__c__Gen_stmt
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:28393: by v__gen__c__Gen_stmts_with_tmp_var
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:28232: by v__gen__c__Gen_stmts
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:27060: by v__gen__c__Gen_gen_file
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:26997: by v__gen__c__cgen_process_one_file_cb
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:33053: by sync__pool__process_in_thread
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:15843: by sync__pool__process_in_thread_thread_wrapper
0x73303229caa4: by ???
0x733032329c3c: by ???
Possible Solution
No response
Additional Information/Context
As far as I can tell, both veb and a nested object are required to recreate.
Describe the bug
Only when using veb, inserting an struct which contains another struct into an sqlite table causes a compilation error.
Reproduction Steps
Repo: https://github.com/Meeds122/v_bug_8.12.2025
Expected Behavior
The V program to successfully compile and start a veb server on 8080
Current Behavior
tristan@desktop:~/programming/v_bug_8.12.2025$ v run .
main.v:50:2: warning: unused variable:
user_id48 |
49 | // Compiler Bug
50 | user_id := sql app.db {
| ~~~~~~~
51 | insert new_user into User
52 | } or { panic(error) }
V panic: table.sym: invalid type (typ=ast.Type(0x0 = 0) idx=0). Compiler bug. This should never happen. Please report the bug using
v bug file.v.v hash: db66120
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:19356: at _v_panic: Backtrace
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:36966: by v__ast__default_table_panic_handler
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:36972: by v__ast__Table_panic
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:37671: by v__ast__Table_sym
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:48976: by v__gen__c__Gen_get_table_name_by_struct_type
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:47532: by v__gen__c__Gen_sql_stmt_line
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:47873: by v__gen__c__Gen_write_orm_insert_with_last_ids
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:47731: by v__gen__c__Gen_write_orm_insert
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:47518: by v__gen__c__Gen_sql_insert_expr
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:30246: by v__gen__c__Gen_expr
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:22810: by v__gen__c__Gen_assign_stmt
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:28625: by v__gen__c__Gen_stmt
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:28393: by v__gen__c__Gen_stmts_with_tmp_var
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:28232: by v__gen__c__Gen_stmts
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:39289: by v__gen__c__Gen_gen_fn_decl
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:38826: by v__gen__c__Gen_fn_decl
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:28607: by v__gen__c__Gen_stmt
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:28393: by v__gen__c__Gen_stmts_with_tmp_var
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:28232: by v__gen__c__Gen_stmts
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:27060: by v__gen__c__Gen_gen_file
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:26997: by v__gen__c__cgen_process_one_file_cb
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:33053: by sync__pool__process_in_thread
/tmp/v_1000/v2.01K2KG4WJR55YC2BF83TR09150.tmp.c:15843: by sync__pool__process_in_thread_thread_wrapper
0x73303229caa4: by ???
0x733032329c3c: by ???
Possible Solution
No response
Additional Information/Context
As far as I can tell, both veb and a nested object are required to recreate.
V version
V 0.4.11 db66120
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.