We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21c452c commit 3a134acCopy full SHA for 3a134ac
vlib/v/checker/checker.v
@@ -6271,6 +6271,10 @@ fn (mut c Checker) sql_stmt(mut node ast.SqlStmt) ast.Type {
6271
c.ensure_type_exists(node.table_expr.typ, node.pos) or { return ast.void_type }
6272
table_sym := c.table.get_type_symbol(node.table_expr.typ)
6273
c.cur_orm_ts = table_sym
6274
+ if table_sym.info !is ast.Struct {
6275
+ c.error('unknown type `$table_sym.name`', node.pos)
6276
+ return ast.void_type
6277
+ }
6278
info := table_sym.info as ast.Struct
6279
fields := c.fetch_and_verify_orm_fields(info, node.table_expr.pos, table_sym.name)
6280
mut sub_structs := map[int]ast.SqlStmt{}
0 commit comments