added different errors instead of ERROR_COMPILE_TIME_VALUE with different text

check type for constants in DataFlowUtils

GitOrigin-RevId: 9c36936a79913996c6b2d4700e790870de742586
This commit is contained in:
Svetlana Isakova
2013-09-13 15:04:17 +03:00
committed by intellij-monorepo-bot
parent 647ba3d6de
commit 98d1110426
5 changed files with 5 additions and 5 deletions
@@ -164,7 +164,7 @@ public class JetPsiChecker implements Annotator {
return;
}
if (diagnostic.getFactory() == Errors.ILLEGAL_ESCAPE_SEQUENCE) {
if (diagnostic.getFactory() == Errors.ILLEGAL_ESCAPE) {
for (TextRange textRange : diagnostic.getTextRanges()) {
Annotation annotation = holder.createErrorAnnotation(textRange, getDefaultMessage(diagnostic));
annotation.setTooltip(getMessage(diagnostic));
@@ -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