added different errors instead of ERROR_COMPILE_TIME_VALUE with different text

check type for constants in DataFlowUtils
This commit is contained in:
Svetlana Isakova
2013-09-12 17:25:59 +04:00
parent d556ceedc1
commit 96db2ecabd
30 changed files with 258 additions and 158 deletions
@@ -1,5 +1,5 @@
// "Change 'prop' type to 'Int'" "true"
// ERROR: Null can not be a value of a non-null type Int
// ERROR: Null can not be a value of a non-null type jet.Int
trait Test<T> {
val prop : T
}
@@ -1,5 +1,5 @@
// "Change 'prop' type to 'Int'" "true"
// ERROR: Null can not be a value of a non-null type Int
// ERROR: Null can not be a value of a non-null type jet.Int
trait Test<T> {
val prop : T
}
@@ -1,5 +1,5 @@
// "Change 'A.component2' function return type to 'Unit'" "true"
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>jet.Unit</td></tr><tr><td>Found:</td><td>jet.Int</td></tr></table></html>
// ERROR: An integer literal does not conform to the expected type jet.Unit
abstract class A {
abstract fun component1(): Int
fun component2(): Unit = 42
@@ -1,5 +1,5 @@
// "Change 'A.component2' function return type to 'Unit'" "true"
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>jet.Unit</td></tr><tr><td>Found:</td><td>jet.Int</td></tr></table></html>
// ERROR: An integer literal does not conform to the expected type jet.Unit
abstract class A {
abstract fun component1(): Int
fun component2() = 42