mirror of
https://github.com/github/codeql.git
synced 2026-05-04 21:25:44 +02:00
Kotlin: Add support for IMPLICIT_NOTNULL
This commit is contained in:
@@ -1507,6 +1507,16 @@ class X {
|
||||
extractTypeAccess(e.typeOperand, id, 0, e)
|
||||
extractExpressionExpr(e.argument, callable, id, 1)
|
||||
}
|
||||
IrTypeOperator.IMPLICIT_NOTNULL -> {
|
||||
// TODO: Make this distinguishable from an explicit cast?
|
||||
val id = tw.getFreshIdLabel<DbCastexpr>()
|
||||
val locId = tw.getLocation(e)
|
||||
val type = useType(e.type)
|
||||
tw.writeExprs_castexpr(id, type.javaResult.id, type.kotlinResult.id, parent, idx)
|
||||
tw.writeHasLocation(id, locId)
|
||||
extractTypeAccess(e.typeOperand, id, 0, e)
|
||||
extractExpressionExpr(e.argument, callable, id, 1)
|
||||
}
|
||||
IrTypeOperator.INSTANCEOF -> {
|
||||
val id = tw.getFreshIdLabel<DbInstanceofexpr>()
|
||||
val locId = tw.getLocation(e)
|
||||
|
||||
@@ -101,3 +101,6 @@
|
||||
| exprs.kt:71:8:71:16 | ... != ... | NEExpr |
|
||||
| exprs.kt:71:13:71:16 | null | NullLiteral |
|
||||
| exprs.kt:72:9:72:29 | r2 | LocalVariableDeclExpr |
|
||||
| exprs.kt:72:29:72:29 | (...)... | CastExpr |
|
||||
| exprs.kt:72:29:72:29 | Rectangle | TypeAccess |
|
||||
| exprs.kt:72:29:72:29 | r | VarAccess |
|
||||
|
||||
Reference in New Issue
Block a user