From fdb4f17866b740b93a9b2b23474b2664236420de Mon Sep 17 00:00:00 2001 From: Louis Schmieder Date: Wed, 7 Apr 2021 17:53:04 +0200 Subject: [PATCH] ci: fix compilation with g++ (#9629) --- vlib/v/gen/c/sql.v | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vlib/v/gen/c/sql.v b/vlib/v/gen/c/sql.v index 4ec32864d0..b782ff6bec 100644 --- a/vlib/v/gen/c/sql.v +++ b/vlib/v/gen/c/sql.v @@ -377,12 +377,13 @@ fn (mut g Gen) sqlite3_create_table(node ast.SqlStmt, typ SqlType) { mut fields := []string{} - outer: for field in struct_data.fields { + for field in struct_data.fields { mut is_primary := false + mut skip := false for attr in field.attrs { match attr.name { 'skip' { - continue outer + skip = true } 'primary' { is_primary = true @@ -390,6 +391,9 @@ fn (mut g Gen) sqlite3_create_table(node ast.SqlStmt, typ SqlType) { else {} } } + if skip { // cpp workaround + continue + } mut stmt := '' mut converted_typ := g.sql_type_from_v(typ, field.typ) mut name := field.name