Skip to content

Commit 00a2a77

Browse files
authored
Don't allow ABS("foo") (sqldelight#3430)
Co-authored-by: hfhbd <hfhbd@users.noreply.github.com>
1 parent a7e9a8f commit 00a2a77

File tree

1 file changed

+1
-1
lines changed
  • sqldelight-compiler/src/main/kotlin/app/cash/sqldelight/core/lang/util

1 file changed

+1
-1
lines changed

sqldelight-compiler/src/main/kotlin/app/cash/sqldelight/core/lang/util/ExprUtil.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ internal object AnsiSqlTypeResolver : TypeResolver {
134134
}
135135

136136
"avg" -> IntermediateType(REAL).asNullable()
137-
"abs" -> exprList[0].type()
137+
"abs" -> encapsulatingType(exprList, INTEGER, REAL)
138138
"iif" -> exprList[1].type()
139139
"coalesce", "ifnull" -> encapsulatingType(exprList, INTEGER, REAL, TEXT, BLOB)
140140
"nullif" -> exprList[0].type().asNullable()

0 commit comments

Comments
 (0)