Replace some FIR syntax errors with more proper diagnostics

This commit is contained in:
Mikhail Glukhikh
2020-03-24 19:33:34 +03:00
parent 2f63c8a46a
commit b27152f903
53 changed files with 339 additions and 320 deletions
@@ -6,12 +6,12 @@ fun foo(i: Int) = i
fun bar(l: Long) = l
fun main() {
val i = <!ILLEGAL_CONST_EXPRESSION, ILLEGAL_CONST_EXPRESSION, ILLEGAL_CONST_EXPRESSION!>111111111111111777777777777777<!>
val i = <!ILLEGAL_CONST_EXPRESSION!>111111111111111777777777777777<!>
//todo add diagnostic text messages
//report only 'The value is out of range'
//not 'An integer literal does not conform to the expected type Int/Long'
val l: Long = <!ILLEGAL_CONST_EXPRESSION, ILLEGAL_CONST_EXPRESSION!>1111111111111117777777777777777<!>
foo(<!ILLEGAL_CONST_EXPRESSION, ILLEGAL_CONST_EXPRESSION!>11111111111111177777777777777<!>)
bar(<!ILLEGAL_CONST_EXPRESSION, ILLEGAL_CONST_EXPRESSION!>11111111111111177777777777777<!>)
val l: Long = <!ILLEGAL_CONST_EXPRESSION!>1111111111111117777777777777777<!>
foo(<!ILLEGAL_CONST_EXPRESSION!>11111111111111177777777777777<!>)
bar(<!ILLEGAL_CONST_EXPRESSION!>11111111111111177777777777777<!>)
}