dd264cff50
In this commit we have a lot of change in test data. This was caused by the way where we evaluate constants. We split constant evaluation into two distinct parts: only necessary evaluations for `fir2ir` (like const val and annotations) and optimizations for lowering. Now we don't do all constant evaluation on `fir2ir`, but IR dump is executed after this phase, so test data changed. #KT-58923
67 lines
1.3 KiB
Kotlin
Vendored
67 lines
1.3 KiB
Kotlin
Vendored
private fun test(x: Long) {
|
|
return countIssues(restrictionsBuilder = local fun ArgumentsBuilder.<anonymous>() {
|
|
($this$countIssues, <get-spentTime>().lessEq<Int>(t = 2.times(other = 60))).unaryPlus()
|
|
($this$countIssues, <get-spentTime>().lessEq<Int>(t = id<Int>(arg = 2.times(other = 60)))).unaryPlus()
|
|
($this$countIssues, <get-spentTime>().select<Long>(t = 2.times(other = 60).toLong(), r = x)).unaryPlus()
|
|
}
|
|
)
|
|
}
|
|
|
|
val spentTime: Column
|
|
field = integer(name = "spentTime")
|
|
get
|
|
|
|
fun integer(name: String): Column {
|
|
return Column()
|
|
}
|
|
|
|
fun <I : Any?> id(arg: I): I {
|
|
return arg
|
|
}
|
|
|
|
infix fun <T : Comparable<T>> Column.lessEq(t: T): Expression {
|
|
return Expression()
|
|
}
|
|
|
|
fun <T : Comparable<T>> Column.select(t: T, r: T): Expression {
|
|
return Expression()
|
|
}
|
|
|
|
class Expression {
|
|
constructor() /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
class Column {
|
|
constructor() /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
class ArgumentsBuilder {
|
|
constructor() /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
val arguments: MutableList<Expression>
|
|
field = mutableListOf<Expression>()
|
|
get
|
|
|
|
operator fun Expression.unaryPlus() {
|
|
<this>.<get-arguments>().add(element = <this>) /*~> Unit */
|
|
}
|
|
|
|
}
|
|
|
|
private fun countIssues(restrictionsBuilder: @ExtensionFunctionType Function1<ArgumentsBuilder, Unit>) {
|
|
}
|