FIR: Support FirComparisonOperator in body transformers and DFA

^KT-31163 In Progress
This commit is contained in:
Denis Zharkov
2020-02-26 16:45:57 +03:00
parent c3aed433ae
commit 434444cd69
31 changed files with 191 additions and 149 deletions
@@ -11,7 +11,7 @@ fun takeFirst(expr: StringBuilder): Char {
fun evaluateArg(expr: CharSequence, numbers: ArrayList<Int>): Int {
if (expr.length == 0) throw Exception("Syntax error: Character expected");
val c = <!INAPPLICABLE_CANDIDATE!>takeFirst<!>(expr)
if (c >= '0' && c <= '9') {
if (c <!UNRESOLVED_REFERENCE!>>=<!> '0' && c <!UNRESOLVED_REFERENCE!><=<!> '9') {
val n = c <!UNRESOLVED_REFERENCE!>-<!> '0'
if (!numbers.contains(n)) throw Exception("You used incorrect number: " + n)
numbers.remove(n)
@@ -3,6 +3,6 @@
// See EA-76890 / KT-10843: NPE during analysis
fun lambda(x : Int?) = x?.<!UNRESOLVED_REFERENCE!>let<!> <!UNRESOLVED_REFERENCE!>l<!> {
y ->
if (y > 0) return@l x
if (y <!UNRESOLVED_REFERENCE!>><!> 0) return@l x
y
}!!