From 54dfd626ab1495d536271dcef8164333266f4f6a Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Sat, 13 Jun 2015 03:43:20 +0300 Subject: [PATCH] CLI: improve diagnostic message format - render the whole line where the error/warning points to, if any, and another line with '^', like other compilers do - lowercase diagnostic severity - decapitalize the message if it doesn't start with a proper name --- .../messages/CompilerMessageLocation.kt | 14 ++++-- .../cli/common/messages/MessageRenderer.java | 50 ++++++++++++++++--- .../messages/AnalyzerWithCompilerReport.java | 15 ++++-- .../cli/common/messages/MessageUtil.java | 11 ++-- .../kotlin/diagnostics/DiagnosticUtils.java | 20 ++++++-- .../cli/js/diagnosticForClassLiteral.out | 4 +- .../cli/js/diagnosticForUnhandledElements.out | 6 ++- ...iagnosticWhenReferenceToBuiltinsMember.out | 8 ++- compiler/testData/cli/js/emptySources.out | 4 +- compiler/testData/cli/js/inlineCycle.out | 10 ++-- .../testData/cli/js/libraryDirNotFound.out | 2 +- .../testData/cli/js/nonExistingSourcePath.out | 4 +- .../testData/cli/js/notValidLibraryDir.out | 4 +- .../testData/cli/js/outputIsDirectory.out | 4 +- .../cli/js/outputPostfixFileNotFound.out | 2 +- .../cli/js/outputPrefixFileNotFound.out | 2 +- compiler/testData/cli/js/wrongAbiVersion.out | 4 +- compiler/testData/cli/jvm/classpath.out | 22 +++++--- .../testData/cli/jvm/conflictingOverloads.out | 10 ++-- .../testData/cli/jvm/diagnosticsOrder.out | 36 +++++++++---- .../testData/cli/jvm/duplicateSources.out | 4 +- .../cli/jvm/duplicateSourcesInModule.out | 4 +- compiler/testData/cli/jvm/emptySources.out | 4 +- compiler/testData/cli/jvm/inlineCycle.out | 10 ++-- .../multipleTextRangesInDiagnosticsOrder.out | 12 +++-- .../cli/jvm/noReflectionInClasspath.out | 8 ++- ...nonExistingClassPathAndAnnotationsPath.out | 4 +- .../cli/jvm/nonExistingSourcePath.out | 2 +- .../testData/cli/jvm/nonLocalDisabled.out | 10 ++-- .../testData/cli/jvm/pluginSimpleUsage.out | 4 +- compiler/testData/cli/jvm/signatureClash.out | 38 ++++++++++---- .../jvm/syntheticAccessorSignatureClash.out | 26 +++++++--- compiler/testData/cli/jvm/wrongAbiVersion.out | 10 ++-- .../testData/cli/jvm/wrongKotlinSignature.out | 2 +- .../cli/jvm/wrongScriptWithNoSource.out | 4 +- .../incompleteHierarchyInJava/output.txt | 8 +-- .../ant/js/verbose/build.log.expected | 4 +- .../ant/js/version/build.log.expected | 2 +- .../additionalArguments/build.log.expected | 2 +- .../jvm/doNotFailOnError/build.log.expected | 24 ++++++--- .../ant/jvm/jvmClasspath/build.log.expected | 4 +- .../ant/jvm/verbose/build.log.expected | 4 +- .../ant/jvm/version/build.log.expected | 2 +- .../compilationFailed/hello.compile.expected | 4 +- .../smoke/syntaxErrors/test.compile.expected | 4 +- compiler/testData/repl/analyzeErrors.repl | 4 +- .../testData/repl/objects/localObject.repl | 4 +- compiler/testData/repl/syntaxErrors.repl | 8 ++- .../compilerRunner/CompilerOutputParser.java | 2 +- 49 files changed, 316 insertions(+), 134 deletions(-) diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/messages/CompilerMessageLocation.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/messages/CompilerMessageLocation.kt index fd7411f2727..afabf866c6f 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/messages/CompilerMessageLocation.kt +++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/messages/CompilerMessageLocation.kt @@ -21,15 +21,21 @@ import kotlin.platform.platformStatic public data class CompilerMessageLocation private constructor( public val path: String?, public val line: Int, - public val column: Int + public val column: Int, + public val lineContent: String? ) { override fun toString(): String = path + (if (line != -1 || column != -1) " (" + line + ":" + column + ")" else "") companion object { - public platformStatic val NO_LOCATION: CompilerMessageLocation = CompilerMessageLocation(null, -1, -1) + public platformStatic val NO_LOCATION: CompilerMessageLocation = CompilerMessageLocation(null, -1, -1, null) - public platformStatic fun create(path: String?, line: Int, column: Int): CompilerMessageLocation = - if (path == null) NO_LOCATION else CompilerMessageLocation(path, line, column) + public platformStatic fun create( + path: String?, + line: Int, + column: Int, + lineContent: String? + ): CompilerMessageLocation = + if (path == null) NO_LOCATION else CompilerMessageLocation(path, line, column, lineContent) } } diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/messages/MessageRenderer.java b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/messages/MessageRenderer.java index e1822fa1de1..8c95a54d6d0 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/messages/MessageRenderer.java +++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/messages/MessageRenderer.java @@ -17,6 +17,8 @@ package org.jetbrains.kotlin.cli.common.messages; import com.intellij.openapi.util.text.StringUtil; +import com.intellij.util.LineSeparator; +import kotlin.KotlinPackage; import kotlin.io.IoPackage; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -78,6 +80,8 @@ public interface MessageRenderer { }; abstract class PlainText implements MessageRenderer { + private static final String LINE_SEPARATOR = LineSeparator.getSystemLineSeparator().getSeparatorString(); + @Override public String renderPreamble() { return ""; @@ -88,24 +92,56 @@ public interface MessageRenderer { @NotNull CompilerMessageSeverity severity, @NotNull String message, @NotNull CompilerMessageLocation location ) { StringBuilder result = new StringBuilder(); - result.append(severity).append(": "); + + int line = location.getLine(); + int column = location.getColumn(); + String lineContent = location.getLineContent(); String path = getPath(location); if (path != null) { result.append(path); - result.append(": "); - if (location.getLine() > 0 && location.getColumn() > 0) { - result.append("("); - result.append(location.getLine()).append(", ").append(location.getColumn()); - result.append(") "); + result.append(":"); + if (line > 0) { + result.append(line).append(":"); + if (column > 0) { + result.append(column).append(":"); + } } + result.append(" "); } - result.append(message); + result.append(severity.name().toLowerCase()); + result.append(": "); + + result.append(decapitalizeIfNeeded(message)); + + if (lineContent != null && 1 <= column && column <= lineContent.length() + 1) { + result.append(LINE_SEPARATOR); + result.append(lineContent); + result.append(LINE_SEPARATOR); + result.append(KotlinPackage.repeat(" ", column - 1)); + result.append("^"); + } return result.toString(); } + @NotNull + private static String decapitalizeIfNeeded(@NotNull String message) { + // TODO: invent something more clever + // An ad-hoc heuristic to prevent decapitalization of some names + if (message.startsWith("Java") || message.startsWith("Kotlin")) { + return message; + } + + // For abbreviations and capitalized text + if (message.length() >= 2 && Character.isUpperCase(message.charAt(0)) && Character.isUpperCase(message.charAt(1))) { + return message; + } + + return KotlinPackage.decapitalize(message); + } + @Nullable protected abstract String getPath(@NotNull CompilerMessageLocation location); diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/common/messages/AnalyzerWithCompilerReport.java b/compiler/cli/src/org/jetbrains/kotlin/cli/common/messages/AnalyzerWithCompilerReport.java index 8a70c251c72..469aafca0a3 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/common/messages/AnalyzerWithCompilerReport.java +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/common/messages/AnalyzerWithCompilerReport.java @@ -73,17 +73,22 @@ public final class AnalyzerWithCompilerReport { private static boolean reportDiagnostic(@NotNull Diagnostic diagnostic, @NotNull MessageCollector messageCollector) { if (!diagnostic.isValid()) return false; - DiagnosticUtils.LineAndColumn lineAndColumn = DiagnosticUtils.getLineAndColumn(diagnostic); + String render; if (diagnostic instanceof MyDiagnostic) { - render = ((MyDiagnostic)diagnostic).message; + render = ((MyDiagnostic) diagnostic).message; } else { render = DefaultErrorMessages.render(diagnostic); } + PsiFile file = diagnostic.getPsiFile(); - messageCollector.report(convertSeverity(diagnostic.getSeverity()), render, - MessageUtil.psiFileToMessageLocation(file, file.getName(), lineAndColumn.getLine(), lineAndColumn.getColumn())); + messageCollector.report( + convertSeverity(diagnostic.getSeverity()), + render, + MessageUtil.psiFileToMessageLocation(file, file.getName(), DiagnosticUtils.getLineAndColumn(diagnostic)) + ); + return diagnostic.getSeverity() == Severity.ERROR; } @@ -141,7 +146,7 @@ public final class AnalyzerWithCompilerReport { CompilerMessageSeverity.ERROR, "Class '" + JvmClassName.byClassId(data.getClassId()) + "' was compiled with an incompatible version of Kotlin. " + "Its ABI version is " + data.getActualVersion() + ", expected ABI version is " + JvmAbi.VERSION, - CompilerMessageLocation.create(path, -1, -1) + CompilerMessageLocation.create(path, -1, -1, null) ); } } diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/common/messages/MessageUtil.java b/compiler/cli/src/org/jetbrains/kotlin/cli/common/messages/MessageUtil.java index 0d07189382d..10ffb209deb 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/common/messages/MessageUtil.java +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/common/messages/MessageUtil.java @@ -33,12 +33,15 @@ public class MessageUtil { @NotNull public static CompilerMessageLocation psiElementToMessageLocation(@NotNull PsiElement element) { PsiFile file = element.getContainingFile(); - DiagnosticUtils.LineAndColumn lineAndColumn = DiagnosticUtils.getLineAndColumnInPsiFile(file, element.getTextRange()); - return psiFileToMessageLocation(file, "", lineAndColumn.getLine(), lineAndColumn.getColumn()); + return psiFileToMessageLocation(file, "", DiagnosticUtils.getLineAndColumnInPsiFile(file, element.getTextRange())); } @NotNull - public static CompilerMessageLocation psiFileToMessageLocation(@NotNull PsiFile file, @Nullable String defaultValue, int line, int column) { + public static CompilerMessageLocation psiFileToMessageLocation( + @NotNull PsiFile file, + @Nullable String defaultValue, + @NotNull DiagnosticUtils.LineAndColumn lineAndColumn + ) { String path; VirtualFile virtualFile = file.getVirtualFile(); if (virtualFile == null) { @@ -51,6 +54,6 @@ public class MessageUtil { path = toSystemDependentName(path); } } - return CompilerMessageLocation.create(path, line, column); + return CompilerMessageLocation.create(path, lineAndColumn.getLine(), lineAndColumn.getColumn(), lineAndColumn.getLineContent()); } } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/DiagnosticUtils.java b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/DiagnosticUtils.java index 2b38e5787e4..d207192ea0d 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/DiagnosticUtils.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/DiagnosticUtils.java @@ -128,16 +128,19 @@ public class DiagnosticUtils { } @NotNull - public static LineAndColumn offsetToLineAndColumn(Document document, int offset) { + public static LineAndColumn offsetToLineAndColumn(@Nullable Document document, int offset) { if (document == null) { - return new LineAndColumn(-1, offset); + return new LineAndColumn(-1, offset, null); } int lineNumber = document.getLineNumber(offset); int lineStartOffset = document.getLineStartOffset(lineNumber); int column = offset - lineStartOffset; - return new LineAndColumn(lineNumber + 1, column + 1); + int lineEndOffset = document.getLineEndOffset(lineNumber); + CharSequence lineContent = document.getCharsSequence().subSequence(lineStartOffset, lineEndOffset); + + return new LineAndColumn(lineNumber + 1, column + 1, lineContent.toString()); } public static void throwIfRunningOnServer(Throwable e) { @@ -184,14 +187,16 @@ public class DiagnosticUtils { public static final class LineAndColumn { - public static final LineAndColumn NONE = new LineAndColumn(-1, -1); + public static final LineAndColumn NONE = new LineAndColumn(-1, -1, null); private final int line; private final int column; + private final String lineContent; - public LineAndColumn(int line, int column) { + public LineAndColumn(int line, int column, @Nullable String lineContent) { this.line = line; this.column = column; + this.lineContent = lineContent; } public int getLine() { @@ -202,6 +207,11 @@ public class DiagnosticUtils { return column; } + @Nullable + public String getLineContent() { + return lineContent; + } + // NOTE: This method is used for presenting positions to the user @Override public String toString() { diff --git a/compiler/testData/cli/js/diagnosticForClassLiteral.out b/compiler/testData/cli/js/diagnosticForClassLiteral.out index 4d69c087034..e8ac55c7d01 100644 --- a/compiler/testData/cli/js/diagnosticForClassLiteral.out +++ b/compiler/testData/cli/js/diagnosticForClassLiteral.out @@ -1,2 +1,4 @@ -ERROR: compiler/testData/cli/js/diagnosticForClassLiteral.kt: (6, 5) Cannot translate (not supported yet): 'A::class' +compiler/testData/cli/js/diagnosticForClassLiteral.kt:6:5: error: cannot translate (not supported yet): 'A::class' + A::class + ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/js/diagnosticForUnhandledElements.out b/compiler/testData/cli/js/diagnosticForUnhandledElements.out index 8b215bc59ea..5abe071dcd4 100644 --- a/compiler/testData/cli/js/diagnosticForUnhandledElements.out +++ b/compiler/testData/cli/js/diagnosticForUnhandledElements.out @@ -1,2 +1,4 @@ -ERROR: compiler/testData/cli/js/diagnosticForUnhandledElements.kt: (9, 17) Cannot translate (not supported yet): '@fancy 1' -COMPILATION_ERROR \ No newline at end of file +compiler/testData/cli/js/diagnosticForUnhandledElements.kt:9:17: error: cannot translate (not supported yet): '@fancy 1' + return (@fancy 1) + ^ +COMPILATION_ERROR diff --git a/compiler/testData/cli/js/diagnosticWhenReferenceToBuiltinsMember.out b/compiler/testData/cli/js/diagnosticWhenReferenceToBuiltinsMember.out index 8a34015e98f..28791c792e4 100644 --- a/compiler/testData/cli/js/diagnosticWhenReferenceToBuiltinsMember.out +++ b/compiler/testData/cli/js/diagnosticWhenReferenceToBuiltinsMember.out @@ -1,3 +1,7 @@ -ERROR: compiler/testData/cli/js/diagnosticWhenReferenceToBuiltinsMember.kt: (4, 5) Callable references for builtin members are not supported yet: 'Int::toByte' -ERROR: compiler/testData/cli/js/diagnosticWhenReferenceToBuiltinsMember.kt: (5, 5) Callable references for builtin members are not supported yet: 'String::length' +compiler/testData/cli/js/diagnosticWhenReferenceToBuiltinsMember.kt:4:5: error: callable references for builtin members are not supported yet: 'Int::toByte' + Int::toByte + ^ +compiler/testData/cli/js/diagnosticWhenReferenceToBuiltinsMember.kt:5:5: error: callable references for builtin members are not supported yet: 'String::length' + String::length + ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/js/emptySources.out b/compiler/testData/cli/js/emptySources.out index abdeccce196..997aed27463 100644 --- a/compiler/testData/cli/js/emptySources.out +++ b/compiler/testData/cli/js/emptySources.out @@ -1,2 +1,2 @@ -ERROR: No source files -COMPILATION_ERROR \ No newline at end of file +error: no source files +COMPILATION_ERROR diff --git a/compiler/testData/cli/js/inlineCycle.out b/compiler/testData/cli/js/inlineCycle.out index 40c4b3122c6..f0b7956570f 100644 --- a/compiler/testData/cli/js/inlineCycle.out +++ b/compiler/testData/cli/js/inlineCycle.out @@ -1,3 +1,7 @@ -ERROR: compiler/testData/cli/js/inlineCycle.kt: (2, 5) The 'b' invocation is a part of inline cycle -ERROR: compiler/testData/cli/js/inlineCycle.kt: (15, 5) The 'a' invocation is a part of inline cycle -COMPILATION_ERROR \ No newline at end of file +compiler/testData/cli/js/inlineCycle.kt:2:5: error: the 'b' invocation is a part of inline cycle + b(l) + ^ +compiler/testData/cli/js/inlineCycle.kt:15:5: error: the 'a' invocation is a part of inline cycle + a(p) + ^ +COMPILATION_ERROR diff --git a/compiler/testData/cli/js/libraryDirNotFound.out b/compiler/testData/cli/js/libraryDirNotFound.out index 35e96ef82e2..3f4e3e154fc 100644 --- a/compiler/testData/cli/js/libraryDirNotFound.out +++ b/compiler/testData/cli/js/libraryDirNotFound.out @@ -1,2 +1,2 @@ -ERROR: Path 'not/existing/path' does not exist +error: path 'not/existing/path' does not exist COMPILATION_ERROR diff --git a/compiler/testData/cli/js/nonExistingSourcePath.out b/compiler/testData/cli/js/nonExistingSourcePath.out index 4388c9034a6..9d0049b1964 100644 --- a/compiler/testData/cli/js/nonExistingSourcePath.out +++ b/compiler/testData/cli/js/nonExistingSourcePath.out @@ -1,2 +1,2 @@ -ERROR: Source file or directory not found: not/existing/path -COMPILATION_ERROR \ No newline at end of file +error: source file or directory not found: not/existing/path +COMPILATION_ERROR diff --git a/compiler/testData/cli/js/notValidLibraryDir.out b/compiler/testData/cli/js/notValidLibraryDir.out index 2be5465ccf9..29476d29214 100644 --- a/compiler/testData/cli/js/notValidLibraryDir.out +++ b/compiler/testData/cli/js/notValidLibraryDir.out @@ -1,2 +1,2 @@ -ERROR: 'compiler/testData/integration/ant/js/simpleWithStdlibAndFolderAsAnotherLib' is not a valid Kotlin Javascript library -COMPILATION_ERROR \ No newline at end of file +error: 'compiler/testData/integration/ant/js/simpleWithStdlibAndFolderAsAnotherLib' is not a valid Kotlin Javascript library +COMPILATION_ERROR diff --git a/compiler/testData/cli/js/outputIsDirectory.out b/compiler/testData/cli/js/outputIsDirectory.out index a051db72e9d..5adeb42578b 100644 --- a/compiler/testData/cli/js/outputIsDirectory.out +++ b/compiler/testData/cli/js/outputIsDirectory.out @@ -1,2 +1,2 @@ -ERROR: Cannot open output file 'compiler/testData/cli/js': is a directory -COMPILATION_ERROR \ No newline at end of file +error: cannot open output file 'compiler/testData/cli/js': is a directory +COMPILATION_ERROR diff --git a/compiler/testData/cli/js/outputPostfixFileNotFound.out b/compiler/testData/cli/js/outputPostfixFileNotFound.out index 03501d1cd7d..414fd079cba 100644 --- a/compiler/testData/cli/js/outputPostfixFileNotFound.out +++ b/compiler/testData/cli/js/outputPostfixFileNotFound.out @@ -1,2 +1,2 @@ -ERROR: Output postfix file 'not/existing/path' not found +error: output postfix file 'not/existing/path' not found COMPILATION_ERROR diff --git a/compiler/testData/cli/js/outputPrefixFileNotFound.out b/compiler/testData/cli/js/outputPrefixFileNotFound.out index 2544f978613..ff4ddabc7b3 100644 --- a/compiler/testData/cli/js/outputPrefixFileNotFound.out +++ b/compiler/testData/cli/js/outputPrefixFileNotFound.out @@ -1,2 +1,2 @@ -ERROR: Output prefix file 'not/existing/path' not found +error: output prefix file 'not/existing/path' not found COMPILATION_ERROR diff --git a/compiler/testData/cli/js/wrongAbiVersion.out b/compiler/testData/cli/js/wrongAbiVersion.out index 69177e1e8b1..10c7e1f193a 100644 --- a/compiler/testData/cli/js/wrongAbiVersion.out +++ b/compiler/testData/cli/js/wrongAbiVersion.out @@ -1,2 +1,2 @@ -ERROR: File 'compiler/testData/cli/js/wrongAbiVersionLib/wrongAbiLib.meta.js' was compiled with an incompatible version of Kotlin. Its ABI version is 0, expected ABI version is 3 -COMPILATION_ERROR \ No newline at end of file +error: file 'compiler/testData/cli/js/wrongAbiVersionLib/wrongAbiLib.meta.js' was compiled with an incompatible version of Kotlin. Its ABI version is 0, expected ABI version is 3 +COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/classpath.out b/compiler/testData/cli/jvm/classpath.out index c86a967e06b..bcc3e56e22e 100644 --- a/compiler/testData/cli/jvm/classpath.out +++ b/compiler/testData/cli/jvm/classpath.out @@ -1,6 +1,16 @@ -WARNING: compiler/testData/cli/jvm/classpath.kt: (8, 9) Variable 'a' is never used -WARNING: compiler/testData/cli/jvm/classpath.kt: (9, 9) Variable 'c' is never used -WARNING: compiler/testData/cli/jvm/classpath.kt: (10, 9) Variable 'e' is never used -WARNING: compiler/testData/cli/jvm/classpath.kt: (11, 9) Variable 'f' is never used -WARNING: compiler/testData/cli/jvm/classpath.kt: (12, 9) Variable 'j' is never used -OK \ No newline at end of file +compiler/testData/cli/jvm/classpath.kt:8:9: warning: variable 'a' is never used + val a = Big5() // charsets.jar + ^ +compiler/testData/cli/jvm/classpath.kt:9:9: warning: variable 'c' is never used + val c = DNSNameService() // dnsns.ajr + ^ +compiler/testData/cli/jvm/classpath.kt:10:9: warning: variable 'e' is never used + val e : Cipher? = null // jce.jar + ^ +compiler/testData/cli/jvm/classpath.kt:11:9: warning: variable 'f' is never used + val f : SunJCE? = null // sunjce_provider.jar + ^ +compiler/testData/cli/jvm/classpath.kt:12:9: warning: variable 'j' is never used + val j : ByteBuffered? = null // rt.jar + ^ +OK diff --git a/compiler/testData/cli/jvm/conflictingOverloads.out b/compiler/testData/cli/jvm/conflictingOverloads.out index 06500d6a3bd..f6dc2eb3561 100644 --- a/compiler/testData/cli/jvm/conflictingOverloads.out +++ b/compiler/testData/cli/jvm/conflictingOverloads.out @@ -1,3 +1,7 @@ -ERROR: compiler/testData/cli/jvm/conflictingOverloads.kt: (1, 1) 'internal fun a(): kotlin.List' is already defined in root package -ERROR: compiler/testData/cli/jvm/conflictingOverloads.kt: (2, 1) 'internal fun a(): kotlin.List' is already defined in root package -COMPILATION_ERROR \ No newline at end of file +compiler/testData/cli/jvm/conflictingOverloads.kt:1:1: error: 'internal fun a(): kotlin.List' is already defined in root package +fun a(): List = null!! +^ +compiler/testData/cli/jvm/conflictingOverloads.kt:2:1: error: 'internal fun a(): kotlin.List' is already defined in root package +fun a(): List = null!! +^ +COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/diagnosticsOrder.out b/compiler/testData/cli/jvm/diagnosticsOrder.out index 9e432583a62..a7d5e872cb4 100644 --- a/compiler/testData/cli/jvm/diagnosticsOrder.out +++ b/compiler/testData/cli/jvm/diagnosticsOrder.out @@ -1,10 +1,28 @@ -ERROR: compiler/testData/cli/jvm/diagnosticsOrder1.kt: (1, 5) Redeclaration: x -ERROR: compiler/testData/cli/jvm/diagnosticsOrder1.kt: (2, 5) Redeclaration: x -ERROR: compiler/testData/cli/jvm/diagnosticsOrder1.kt: (3, 5) Redeclaration: x -ERROR: compiler/testData/cli/jvm/diagnosticsOrder1.kt: (4, 5) Redeclaration: x -ERROR: compiler/testData/cli/jvm/diagnosticsOrder1.kt: (5, 5) Redeclaration: x -ERROR: compiler/testData/cli/jvm/diagnosticsOrder1.kt: (6, 5) Redeclaration: x -ERROR: compiler/testData/cli/jvm/diagnosticsOrder1.kt: (7, 5) Redeclaration: x -ERROR: compiler/testData/cli/jvm/diagnosticsOrder2.kt: (1, 5) Redeclaration: y -ERROR: compiler/testData/cli/jvm/diagnosticsOrder2.kt: (2, 5) Redeclaration: y +compiler/testData/cli/jvm/diagnosticsOrder1.kt:1:5: error: redeclaration: x +val x = 5 + ^ +compiler/testData/cli/jvm/diagnosticsOrder1.kt:2:5: error: redeclaration: x +val x = 5 + ^ +compiler/testData/cli/jvm/diagnosticsOrder1.kt:3:5: error: redeclaration: x +val x = 5 + ^ +compiler/testData/cli/jvm/diagnosticsOrder1.kt:4:5: error: redeclaration: x +val x = 5 + ^ +compiler/testData/cli/jvm/diagnosticsOrder1.kt:5:5: error: redeclaration: x +val x = 5 + ^ +compiler/testData/cli/jvm/diagnosticsOrder1.kt:6:5: error: redeclaration: x +val x = 5 + ^ +compiler/testData/cli/jvm/diagnosticsOrder1.kt:7:5: error: redeclaration: x +val x = 5 + ^ +compiler/testData/cli/jvm/diagnosticsOrder2.kt:1:5: error: redeclaration: y +val y = 5 + ^ +compiler/testData/cli/jvm/diagnosticsOrder2.kt:2:5: error: redeclaration: y +val y = 5 + ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/duplicateSources.out b/compiler/testData/cli/jvm/duplicateSources.out index 633de589487..a6aa448ff9a 100644 --- a/compiler/testData/cli/jvm/duplicateSources.out +++ b/compiler/testData/cli/jvm/duplicateSources.out @@ -1,2 +1,2 @@ -WARNING: Duplicate source root: compiler/testData/cli/jvm/simple.kt -OK \ No newline at end of file +warning: duplicate source root: compiler/testData/cli/jvm/simple.kt +OK diff --git a/compiler/testData/cli/jvm/duplicateSourcesInModule.out b/compiler/testData/cli/jvm/duplicateSourcesInModule.out index 5bb55eaa0b3..4dda255ea67 100644 --- a/compiler/testData/cli/jvm/duplicateSourcesInModule.out +++ b/compiler/testData/cli/jvm/duplicateSourcesInModule.out @@ -1,2 +1,2 @@ -WARNING: Duplicate source root: $TESTDATA_DIR$/duplicateSourcesInModule.kt -OK \ No newline at end of file +warning: duplicate source root: $TESTDATA_DIR$/duplicateSourcesInModule.kt +OK diff --git a/compiler/testData/cli/jvm/emptySources.out b/compiler/testData/cli/jvm/emptySources.out index abdeccce196..997aed27463 100644 --- a/compiler/testData/cli/jvm/emptySources.out +++ b/compiler/testData/cli/jvm/emptySources.out @@ -1,2 +1,2 @@ -ERROR: No source files -COMPILATION_ERROR \ No newline at end of file +error: no source files +COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/inlineCycle.out b/compiler/testData/cli/jvm/inlineCycle.out index 88ae93d25a1..987fcd538bf 100644 --- a/compiler/testData/cli/jvm/inlineCycle.out +++ b/compiler/testData/cli/jvm/inlineCycle.out @@ -1,3 +1,7 @@ -ERROR: compiler/testData/cli/jvm/inlineCycle.kt: (2, 5) The 'b' invocation is a part of inline cycle -ERROR: compiler/testData/cli/jvm/inlineCycle.kt: (15, 5) The 'a' invocation is a part of inline cycle -COMPILATION_ERROR \ No newline at end of file +compiler/testData/cli/jvm/inlineCycle.kt:2:5: error: the 'b' invocation is a part of inline cycle + b(l) + ^ +compiler/testData/cli/jvm/inlineCycle.kt:15:5: error: the 'a' invocation is a part of inline cycle + a(p) + ^ +COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.out b/compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.out index 9e6cd1d34db..0e19e5c3287 100644 --- a/compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.out +++ b/compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.out @@ -1,4 +1,10 @@ -ERROR: compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.kt: (6, 14) Cannot weaken access privilege 'public' for 'c' in 'A' -ERROR: compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.kt: (6, 14) Incompatible modifiers: 'private protected' -ERROR: compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.kt: (6, 24) Incompatible modifiers: 'private protected' +compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.kt:6:14: error: cannot weaken access privilege 'public' for 'c' in 'A' + override protected private val c: Int + ^ +compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.kt:6:14: error: incompatible modifiers: 'private protected' + override protected private val c: Int + ^ +compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.kt:6:24: error: incompatible modifiers: 'private protected' + override protected private val c: Int + ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/noReflectionInClasspath.out b/compiler/testData/cli/jvm/noReflectionInClasspath.out index 2569a8b3e51..77b22ce279d 100644 --- a/compiler/testData/cli/jvm/noReflectionInClasspath.out +++ b/compiler/testData/cli/jvm/noReflectionInClasspath.out @@ -1,3 +1,7 @@ -ERROR: compiler/testData/cli/jvm/noReflectionInClasspath.kt: (3, 12) Expression 'Foo::prop' uses reflection which is not found in compilation classpath. Make sure you have kotlin-reflect.jar in the classpath -ERROR: compiler/testData/cli/jvm/noReflectionInClasspath.kt: (4, 12) Expression 'Foo::class' uses reflection which is not found in compilation classpath. Make sure you have kotlin-reflect.jar in the classpath +compiler/testData/cli/jvm/noReflectionInClasspath.kt:3:12: error: expression 'Foo::prop' uses reflection which is not found in compilation classpath. Make sure you have kotlin-reflect.jar in the classpath +fun t1() = Foo::prop + ^ +compiler/testData/cli/jvm/noReflectionInClasspath.kt:4:12: error: expression 'Foo::class' uses reflection which is not found in compilation classpath. Make sure you have kotlin-reflect.jar in the classpath +fun t2() = Foo::class + ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/nonExistingClassPathAndAnnotationsPath.out b/compiler/testData/cli/jvm/nonExistingClassPathAndAnnotationsPath.out index 2503aae0888..cbac3bcd5d4 100644 --- a/compiler/testData/cli/jvm/nonExistingClassPathAndAnnotationsPath.out +++ b/compiler/testData/cli/jvm/nonExistingClassPathAndAnnotationsPath.out @@ -1,3 +1,3 @@ -WARNING: Classpath entry points to a non-existent location: not/existing/path -WARNING: Annotations path entry points to a non-existent location: yet/another/not/existing/path +warning: classpath entry points to a non-existent location: not/existing/path +warning: annotations path entry points to a non-existent location: yet/another/not/existing/path OK diff --git a/compiler/testData/cli/jvm/nonExistingSourcePath.out b/compiler/testData/cli/jvm/nonExistingSourcePath.out index ef3a3fdb989..9d0049b1964 100644 --- a/compiler/testData/cli/jvm/nonExistingSourcePath.out +++ b/compiler/testData/cli/jvm/nonExistingSourcePath.out @@ -1,2 +1,2 @@ -ERROR: Source file or directory not found: not/existing/path +error: source file or directory not found: not/existing/path COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/nonLocalDisabled.out b/compiler/testData/cli/jvm/nonLocalDisabled.out index 6af6051a9bd..a7cfcfadfa5 100644 --- a/compiler/testData/cli/jvm/nonLocalDisabled.out +++ b/compiler/testData/cli/jvm/nonLocalDisabled.out @@ -1,3 +1,7 @@ -ERROR: compiler/testData/cli/jvm/nonLocalDisabled.kt: (3, 9) Non-local returns are not allowed with inlining disabled -ERROR: compiler/testData/cli/jvm/nonLocalDisabled.kt: (7, 9) Non-local returns are not allowed with inlining disabled -COMPILATION_ERROR \ No newline at end of file +compiler/testData/cli/jvm/nonLocalDisabled.kt:3:9: error: non-local returns are not allowed with inlining disabled + return + ^ +compiler/testData/cli/jvm/nonLocalDisabled.kt:7:9: error: non-local returns are not allowed with inlining disabled + return@a + ^ +COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/pluginSimpleUsage.out b/compiler/testData/cli/jvm/pluginSimpleUsage.out index 792e43f8277..a8faeee7a70 100644 --- a/compiler/testData/cli/jvm/pluginSimpleUsage.out +++ b/compiler/testData/cli/jvm/pluginSimpleUsage.out @@ -1,8 +1,8 @@ -ERROR: Required plugin option not present: org.jetbrains.kotlin.android:androidRes +error: required plugin option not present: org.jetbrains.kotlin.android:androidRes Plugin "org.jetbrains.kotlin.android" usage: androidRes Android resources path (required, multiple) androidManifest Android manifest file (required) supportV4 Support android-v4 library -COMPILATION_ERROR \ No newline at end of file +COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/signatureClash.out b/compiler/testData/cli/jvm/signatureClash.out index 1d4c445fc1c..276366d3220 100644 --- a/compiler/testData/cli/jvm/signatureClash.out +++ b/compiler/testData/cli/jvm/signatureClash.out @@ -1,28 +1,46 @@ -ERROR: compiler/testData/cli/jvm/signatureClash.kt: (6, 5) Accidental override: The following declarations have the same JVM signature (getX()I): +compiler/testData/cli/jvm/signatureClash.kt:6:5: error: accidental override: The following declarations have the same JVM signature (getX()I): fun getX(): kotlin.Int fun (): kotlin.Int -ERROR: compiler/testData/cli/jvm/signatureClash.kt: (8, 5) Platform declaration clash: The following declarations have the same JVM signature (getA()I): + fun getX() = 1 + ^ +compiler/testData/cli/jvm/signatureClash.kt:8:5: error: platform declaration clash: The following declarations have the same JVM signature (getA()I): fun getA(): kotlin.Int fun (): kotlin.Int -ERROR: compiler/testData/cli/jvm/signatureClash.kt: (9, 5) Platform declaration clash: The following declarations have the same JVM signature (getA()I): + fun getA(): Int = 1 + ^ +compiler/testData/cli/jvm/signatureClash.kt:9:5: error: platform declaration clash: The following declarations have the same JVM signature (getA()I): fun getA(): kotlin.Int fun (): kotlin.Int -ERROR: compiler/testData/cli/jvm/signatureClash.kt: (12, 1) Platform declaration clash: The following declarations have the same JVM signature (getB()I): + val a: Int = 1 + ^ +compiler/testData/cli/jvm/signatureClash.kt:12:1: error: platform declaration clash: The following declarations have the same JVM signature (getB()I): fun (): kotlin.Int fun getB(): kotlin.Int -ERROR: compiler/testData/cli/jvm/signatureClash.kt: (13, 1) Platform declaration clash: The following declarations have the same JVM signature (getB()I): +fun getB(): Int = 1 +^ +compiler/testData/cli/jvm/signatureClash.kt:13:1: error: platform declaration clash: The following declarations have the same JVM signature (getB()I): fun (): kotlin.Int fun getB(): kotlin.Int -ERROR: compiler/testData/cli/jvm/signatureClash.kt: (19, 7) Platform declaration clash: The following declarations have the same JVM signature (getTr()I): +val b: Int = 1 +^ +compiler/testData/cli/jvm/signatureClash.kt:19:7: error: platform declaration clash: The following declarations have the same JVM signature (getTr()I): fun (): kotlin.Int fun getTr(): kotlin.Int -ERROR: compiler/testData/cli/jvm/signatureClash.kt: (20, 5) Platform declaration clash: The following declarations have the same JVM signature (getTr()I): +class SubTr : Tr { + ^ +compiler/testData/cli/jvm/signatureClash.kt:20:5: error: platform declaration clash: The following declarations have the same JVM signature (getTr()I): fun (): kotlin.Int fun getTr(): kotlin.Int -ERROR: compiler/testData/cli/jvm/signatureClash.kt: (24, 7) Platform declaration clash: The following declarations have the same JVM signature (access$f$0(LC;)V): + val tr = 1 + ^ +compiler/testData/cli/jvm/signatureClash.kt:24:7: error: platform declaration clash: The following declarations have the same JVM signature (access$f$0(LC;)V): fun `access$f$0`(c: C): kotlin.Unit fun f(): kotlin.Unit -ERROR: compiler/testData/cli/jvm/signatureClash.kt: (26, 5) Platform declaration clash: The following declarations have the same JVM signature (access$f$0(LC;)V): +class C { + ^ +compiler/testData/cli/jvm/signatureClash.kt:26:5: error: platform declaration clash: The following declarations have the same JVM signature (access$f$0(LC;)V): fun `access$f$0`(c: C): kotlin.Unit fun f(): kotlin.Unit -COMPILATION_ERROR \ No newline at end of file + fun `access$f$0`(c: C) {} + ^ +COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/syntheticAccessorSignatureClash.out b/compiler/testData/cli/jvm/syntheticAccessorSignatureClash.out index fe5c174f043..2580a9339ed 100644 --- a/compiler/testData/cli/jvm/syntheticAccessorSignatureClash.out +++ b/compiler/testData/cli/jvm/syntheticAccessorSignatureClash.out @@ -1,19 +1,31 @@ -ERROR: compiler/testData/cli/jvm/syntheticAccessorSignatureClash.kt: (15, 5) Accidental override: The following declarations have the same JVM signature (access$foo$0(LDerived;)V): +compiler/testData/cli/jvm/syntheticAccessorSignatureClash.kt:15:5: error: accidental override: The following declarations have the same JVM signature (access$foo$0(LDerived;)V): fun `access$foo$0`(d: Derived): kotlin.Unit fun foo(): kotlin.Unit -ERROR: compiler/testData/cli/jvm/syntheticAccessorSignatureClash.kt: (18, 9) Accidental override: The following declarations have the same JVM signature (access$getBar$1(LDerived;)I): + private fun foo() {} + ^ +compiler/testData/cli/jvm/syntheticAccessorSignatureClash.kt:18:9: error: accidental override: The following declarations have the same JVM signature (access$getBar$1(LDerived;)I): fun `access$getBar$1`(d: Derived): kotlin.Int fun (): kotlin.Int -ERROR: compiler/testData/cli/jvm/syntheticAccessorSignatureClash.kt: (19, 9) Accidental override: The following declarations have the same JVM signature (access$setBar$1(LDerived;I)V): + get + ^ +compiler/testData/cli/jvm/syntheticAccessorSignatureClash.kt:19:9: error: accidental override: The following declarations have the same JVM signature (access$setBar$1(LDerived;I)V): fun `access$setBar$1`(d: Derived, i: kotlin.Int): kotlin.Unit fun (: kotlin.Int): kotlin.Unit -ERROR: compiler/testData/cli/jvm/syntheticAccessorSignatureClash.kt: (21, 5) Accidental override: The following declarations have the same JVM signature (access$getBaz$2(LDerived;)I): + set + ^ +compiler/testData/cli/jvm/syntheticAccessorSignatureClash.kt:21:5: error: accidental override: The following declarations have the same JVM signature (access$getBaz$2(LDerived;)I): fun `access$getBaz$2`(d: Derived): kotlin.Int fun (): kotlin.Int -ERROR: compiler/testData/cli/jvm/syntheticAccessorSignatureClash.kt: (23, 5) Accidental override: The following declarations have the same JVM signature (access$getBoo$3(LDerived;)I): + private var baz = 1 + ^ +compiler/testData/cli/jvm/syntheticAccessorSignatureClash.kt:23:5: error: accidental override: The following declarations have the same JVM signature (access$getBoo$3(LDerived;)I): fun `access$getBoo$3`(d: Derived): kotlin.Int fun (): kotlin.Int -ERROR: compiler/testData/cli/jvm/syntheticAccessorSignatureClash.kt: (27, 9) Accidental override: The following declarations have the same JVM signature (access$setBar1$4(LDerived;I)V): + private val boo = 1 + ^ +compiler/testData/cli/jvm/syntheticAccessorSignatureClash.kt:27:9: error: accidental override: The following declarations have the same JVM signature (access$setBar1$4(LDerived;I)V): fun `access$setBar1$4`(d: Derived, i: kotlin.Int): kotlin.Unit fun (: kotlin.Int): kotlin.Unit -COMPILATION_ERROR \ No newline at end of file + set + ^ +COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/wrongAbiVersion.out b/compiler/testData/cli/jvm/wrongAbiVersion.out index 0a03b81cd66..4ed8ddb01f7 100644 --- a/compiler/testData/cli/jvm/wrongAbiVersion.out +++ b/compiler/testData/cli/jvm/wrongAbiVersion.out @@ -1,4 +1,6 @@ -ERROR: compiler/testData/cli/jvm/wrongAbiVersionLib/bin/ClassWithWrongAbiVersion.class: Class 'ClassWithWrongAbiVersion' was compiled with an incompatible version of Kotlin. Its ABI version is -1, expected ABI version is $ABI_VERSION$ -ERROR: compiler/testData/cli/jvm/wrongAbiVersionLib/bin/wrong/WrongPackage.class: Class 'wrong/WrongPackage' was compiled with an incompatible version of Kotlin. Its ABI version is -1, expected ABI version is $ABI_VERSION$ -ERROR: compiler/testData/cli/jvm/wrongAbiVersion.kt: (4, 3) Unresolved reference: bar -COMPILATION_ERROR \ No newline at end of file +compiler/testData/cli/jvm/wrongAbiVersionLib/bin/ClassWithWrongAbiVersion.class: error: class 'ClassWithWrongAbiVersion' was compiled with an incompatible version of Kotlin. Its ABI version is -1, expected ABI version is $ABI_VERSION$ +compiler/testData/cli/jvm/wrongAbiVersionLib/bin/wrong/WrongPackage.class: error: class 'wrong/WrongPackage' was compiled with an incompatible version of Kotlin. Its ABI version is -1, expected ABI version is $ABI_VERSION$ +compiler/testData/cli/jvm/wrongAbiVersion.kt:4:3: error: unresolved reference: bar + bar() + ^ +COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/wrongKotlinSignature.out b/compiler/testData/cli/jvm/wrongKotlinSignature.out index e07c3996f21..a9aae583857 100644 --- a/compiler/testData/cli/jvm/wrongKotlinSignature.out +++ b/compiler/testData/cli/jvm/wrongKotlinSignature.out @@ -1,4 +1,4 @@ -ERROR: The following Java entities have annotations with wrong Kotlin signatures: +error: the following Java entities have annotations with wrong Kotlin signatures: library.ClassWithWrongKotlinSignatures java.lang.String foo(): Function names mismatch, original: foo, alternative: bar library.ClassWithWrongKotlinSignatures java.lang.String bar(): diff --git a/compiler/testData/cli/jvm/wrongScriptWithNoSource.out b/compiler/testData/cli/jvm/wrongScriptWithNoSource.out index d40cf68f5b0..86d79922fed 100644 --- a/compiler/testData/cli/jvm/wrongScriptWithNoSource.out +++ b/compiler/testData/cli/jvm/wrongScriptWithNoSource.out @@ -1,2 +1,2 @@ -ERROR: Specify script source path to evaluate -COMPILATION_ERROR \ No newline at end of file +error: specify script source path to evaluate +COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/incompleteHierarchyInJava/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/incompleteHierarchyInJava/output.txt index fb8bf783c10..c21fc022e1e 100644 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/incompleteHierarchyInJava/output.txt +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/incompleteHierarchyInJava/output.txt @@ -1,5 +1,7 @@ -ERROR: compiler/testData/compileKotlinAgainstCustomBinaries/incompleteHierarchyInJava/source.kt: (5, 22) Unresolved reference: foo -ERROR: The following classes have incomplete hierarchies: +compiler/testData/compileKotlinAgainstCustomBinaries/incompleteHierarchyInJava/source.kt:5:22: error: unresolved reference: foo +fun bar() = SubSub().foo() + ^ +error: the following classes have incomplete hierarchies: test.Sub, unresolved: [Super] -COMPILATION_ERROR \ No newline at end of file +COMPILATION_ERROR diff --git a/compiler/testData/integration/ant/js/verbose/build.log.expected b/compiler/testData/integration/ant/js/verbose/build.log.expected index db86edb3ce6..5d7a9f26a55 100644 --- a/compiler/testData/integration/ant/js/verbose/build.log.expected +++ b/compiler/testData/integration/ant/js/verbose/build.log.expected @@ -3,8 +3,8 @@ Buildfile: [TestData]/build.xml build: [kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js] -[kotlin2js] LOGGING: Compiling source files: [TestData]/root1/foo.kt -[kotlin2js] OUTPUT: Output: +[kotlin2js] logging: compiling source files: [TestData]/root1/foo.kt +[kotlin2js] output: output: [kotlin2js] [Temp]/out.js [kotlin2js] Sources: [kotlin2js] [TestData]/root1/foo.kt diff --git a/compiler/testData/integration/ant/js/version/build.log.expected b/compiler/testData/integration/ant/js/version/build.log.expected index 660964d92bd..2cd6425e2ad 100644 --- a/compiler/testData/integration/ant/js/version/build.log.expected +++ b/compiler/testData/integration/ant/js/version/build.log.expected @@ -3,7 +3,7 @@ Buildfile: [TestData]/build.xml build: [kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js] -[kotlin2js] INFO: Kotlin Compiler version [KotlinVersion] +[kotlin2js] info: Kotlin Compiler version [KotlinVersion] BUILD SUCCESSFUL Total time: [time] diff --git a/compiler/testData/integration/ant/jvm/additionalArguments/build.log.expected b/compiler/testData/integration/ant/jvm/additionalArguments/build.log.expected index ba7bf123425..2e0c3905dcd 100644 --- a/compiler/testData/integration/ant/jvm/additionalArguments/build.log.expected +++ b/compiler/testData/integration/ant/jvm/additionalArguments/build.log.expected @@ -5,7 +5,7 @@ build: [kotlinc] Compiling [[TestData]/hello.kt] => [[Temp]/hello.jar] [javac] Compiling 1 source file to [Temp] [javac] Compiling [[TestData]] => [[Temp]] - [javac] INFO: Kotlin Compiler version [KotlinVersion] + [javac] info: Kotlin Compiler version [KotlinVersion] [javac] Running javac... BUILD SUCCESSFUL diff --git a/compiler/testData/integration/ant/jvm/doNotFailOnError/build.log.expected b/compiler/testData/integration/ant/jvm/doNotFailOnError/build.log.expected index 1d5b4f29ebd..bf3f570ca21 100644 --- a/compiler/testData/integration/ant/jvm/doNotFailOnError/build.log.expected +++ b/compiler/testData/integration/ant/jvm/doNotFailOnError/build.log.expected @@ -4,13 +4,25 @@ Buildfile: [TestData]/build.xml build: [javac] Compiling 2 source files to [Temp] [javac] Compiling [[TestData]] => [[Temp]] - [javac] ERROR: [TestData]/incorrectKotlinCode.kt: (4, 1) Parameter name expected - [javac] ERROR: [TestData]/incorrectKotlinCode.kt: (4, 1) Expecting comma or ')' - [javac] ERROR: [TestData]/incorrectKotlinCode.kt: (4, 1) Expecting ')' + [javac] [TestData]/incorrectKotlinCode.kt:4:1: error: parameter name expected + [javac] + [javac] ^ + [javac] [TestData]/incorrectKotlinCode.kt:4:1: error: expecting comma or ')' + [javac] + [javac] ^ + [javac] [TestData]/incorrectKotlinCode.kt:4:1: error: expecting ')' + [javac] + [javac] ^ [kotlinc] Compiling [[TestData]] => [[Temp]] - [kotlinc] ERROR: [TestData]/incorrectKotlinCode.kt: (4, 1) Parameter name expected - [kotlinc] ERROR: [TestData]/incorrectKotlinCode.kt: (4, 1) Expecting comma or ')' - [kotlinc] ERROR: [TestData]/incorrectKotlinCode.kt: (4, 1) Expecting ')' + [kotlinc] [TestData]/incorrectKotlinCode.kt:4:1: error: parameter name expected + [kotlinc] + [kotlinc] ^ + [kotlinc] [TestData]/incorrectKotlinCode.kt:4:1: error: expecting comma or ')' + [kotlinc] + [kotlinc] ^ + [kotlinc] [TestData]/incorrectKotlinCode.kt:4:1: error: expecting ')' + [kotlinc] + [kotlinc] ^ BUILD SUCCESSFUL Total time: [time] diff --git a/compiler/testData/integration/ant/jvm/jvmClasspath/build.log.expected b/compiler/testData/integration/ant/jvm/jvmClasspath/build.log.expected index c40d9ca3d8d..cf8480a38b4 100644 --- a/compiler/testData/integration/ant/jvm/jvmClasspath/build.log.expected +++ b/compiler/testData/integration/ant/jvm/jvmClasspath/build.log.expected @@ -3,7 +3,9 @@ Buildfile: [TestData]/build.xml build: [kotlinc] Compiling [[TestData]/hello.kt] => [[Temp]/hello.jar] - [kotlinc] WARNING: [TestData]/hello.kt: (15, 9) Variable 'result' is never used + [kotlinc] [TestData]/hello.kt:15:9: warning: variable 'result' is never used + [kotlinc] val result = "$a$c$e$f$j" + [kotlinc] ^ [java] OK BUILD SUCCESSFUL diff --git a/compiler/testData/integration/ant/jvm/verbose/build.log.expected b/compiler/testData/integration/ant/jvm/verbose/build.log.expected index 5b0f97433c7..e145f644e2e 100644 --- a/compiler/testData/integration/ant/jvm/verbose/build.log.expected +++ b/compiler/testData/integration/ant/jvm/verbose/build.log.expected @@ -3,8 +3,8 @@ Buildfile: [TestData]/build.xml build: [kotlinc] Compiling [[TestData]/hello.kt] => [[Temp]/hello.jar] - [kotlinc] LOGGING: Using Kotlin home directory [KotlinProjectHome]/dist/kotlinc - [kotlinc] LOGGING: Configuring the compilation environment + [kotlinc] logging: using Kotlin home directory [KotlinProjectHome]/dist/kotlinc + [kotlinc] logging: configuring the compilation environment BUILD SUCCESSFUL Total time: [time] diff --git a/compiler/testData/integration/ant/jvm/version/build.log.expected b/compiler/testData/integration/ant/jvm/version/build.log.expected index db341b75807..92a1f0c68f1 100644 --- a/compiler/testData/integration/ant/jvm/version/build.log.expected +++ b/compiler/testData/integration/ant/jvm/version/build.log.expected @@ -3,7 +3,7 @@ Buildfile: [TestData]/build.xml build: [kotlinc] Compiling [[TestData]/hello.kt] => [[Temp]/hello.jar] - [kotlinc] INFO: Kotlin Compiler version [KotlinVersion] + [kotlinc] info: Kotlin Compiler version [KotlinVersion] BUILD SUCCESSFUL Total time: [time] diff --git a/compiler/testData/integration/smoke/compilationFailed/hello.compile.expected b/compiler/testData/integration/smoke/compilationFailed/hello.compile.expected index 918457b2ff1..251109a8756 100644 --- a/compiler/testData/integration/smoke/compilationFailed/hello.compile.expected +++ b/compiler/testData/integration/smoke/compilationFailed/hello.compile.expected @@ -1,5 +1,7 @@ ERR: -ERROR: hello.kt: (4, 5) Unresolved reference: a +hello.kt:4:5: error: unresolved reference: a + a + ^ Return code: 1 diff --git a/compiler/testData/integration/smoke/syntaxErrors/test.compile.expected b/compiler/testData/integration/smoke/syntaxErrors/test.compile.expected index 9e491e21bf7..4fcc3d503ff 100644 --- a/compiler/testData/integration/smoke/syntaxErrors/test.compile.expected +++ b/compiler/testData/integration/smoke/syntaxErrors/test.compile.expected @@ -1,5 +1,7 @@ ERR: -ERROR: test.kt: (4, 20) Expecting an element +test.kt:4:20: error: expecting an element + val s = System.in + ^ Return code: 1 diff --git a/compiler/testData/repl/analyzeErrors.repl b/compiler/testData/repl/analyzeErrors.repl index feecc184774..3b9f3e94a0f 100644 --- a/compiler/testData/repl/analyzeErrors.repl +++ b/compiler/testData/repl/analyzeErrors.repl @@ -1,5 +1,7 @@ >>> fun foo() = 765 >>> foo(1) -ERROR: /line2.kts: (1, 5) Too many arguments for internal final fun foo(): kotlin.Int defined in