checker: disallow using builtin type names for const names (#16599)

This commit is contained in:
Swastik Baranwal 2022-12-06 19:14:25 +05:30 committed by GitHub
parent 5fc7b6d3d6
commit ada8643ac5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 34 additions and 15 deletions

View file

@ -152,7 +152,7 @@ fn (stmt Stmt) sqlite_select_column(idx int, typ int) !orm.Primitive {
primitive = stmt.get_i64(idx)
} else if typ in orm.float {
primitive = stmt.get_f64(idx)
} else if typ == orm.string {
} else if typ == orm.type_string {
primitive = stmt.get_text(idx).clone()
} else if typ == orm.time {
d := stmt.get_int(idx)
@ -170,7 +170,7 @@ fn sqlite_type_from_v(typ int) !string {
'INTEGER'
} else if typ in orm.float {
'REAL'
} else if typ == orm.string {
} else if typ == orm.type_string {
'TEXT'
} else {
error('Unknown type ${typ}')