Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
checker: fix orm cast check (#12018)
- Loading branch information
1 parent
d374c34
commit f9ceb12
Showing
3 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
vlib/v/checker/tests/orm_not_a_struct.vv:10:15: error: The table symbol `Person` has to be a struct | ||
8 | db := sqlite.connect(':memory:')? | ||
9 | _ := sql db { | ||
10 | select from Person | ||
| ~~~~~~ | ||
11 | } | ||
12 | } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import sqlite | ||
|
||
enum Person { | ||
test | ||
} | ||
|
||
fn main() { | ||
db := sqlite.connect(':memory:')? | ||
_ := sql db { | ||
select from Person | ||
} | ||
} |