mirror of
https://github.com/github/codeql.git
synced 2026-05-01 19:55:15 +02:00
Kotlin: reintroduce obinit when we have multiple secondary constructors and no primary
This avoids DB inconsistencies because complex initialisers are extracted to more than one function.
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
| test.kt:3:20:3:32 | new KProperty1<Test,Integer>(...) { ... } | test.kt:3:20:3:32 | ...::... |
|
||||
| test.kt:3:28:3:32 | new Function0<Integer>(...) { ... } | test.kt:3:28:3:32 | ...->... |
|
||||
@@ -0,0 +1,12 @@
|
||||
public class Test {
|
||||
|
||||
val lazyVal: Int by lazy { 5 }
|
||||
|
||||
// Both of these constructors will need to extract the implicit classes created by `lazyVal` and initialize it--
|
||||
// This test checks we don't introduce any inconsistency this way.
|
||||
|
||||
constructor(x: Int) { }
|
||||
|
||||
constructor(y: String) { }
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
import java
|
||||
|
||||
from AnonymousClass ac
|
||||
select ac, ac.getClassInstanceExpr()
|
||||
Reference in New Issue
Block a user