From 221776169462768fd85c60ee58119505d3bd0908 Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Tue, 2 Feb 2016 18:24:34 +0300 Subject: [PATCH] Better diagnostics for conflicting overloads. Skip declarations without sources in reporting, not when determining redeclaration groups: this allows emitting informative diagnostics for incremental compilation. Provide containing declaration with "kind", e.g., "package ''", "class A", and so on. Original commit: 4afe98a0f6c06270cab16b24e5f4f18cf3d4a77d --- .../classHierarchyAffected/secondaryConstructorAdded/build.log | 2 +- .../testData/incremental/pureKotlin/funRedeclaration/build.log | 2 +- .../pureKotlin/funVsConstructorOverloadConflict/build.log | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jps/jps-plugin/testData/incremental/classHierarchyAffected/secondaryConstructorAdded/build.log b/jps/jps-plugin/testData/incremental/classHierarchyAffected/secondaryConstructorAdded/build.log index 7122f36b6d3..977648d6f3f 100644 --- a/jps/jps-plugin/testData/incremental/classHierarchyAffected/secondaryConstructorAdded/build.log +++ b/jps/jps-plugin/testData/incremental/classHierarchyAffected/secondaryConstructorAdded/build.log @@ -5,7 +5,7 @@ Compiling files: src/A.kt End of files COMPILATION FAILED -'public constructor A(x: kotlin.String)' conflicts with another declaration: public constructor A(x: kotlin.String) +'public constructor A(x: kotlin.String)' conflicts with another declaration in package '' Cleaning output files: diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/funRedeclaration/build.log b/jps/jps-plugin/testData/incremental/pureKotlin/funRedeclaration/build.log index 1224d634ee4..39ae0ba5aea 100644 --- a/jps/jps-plugin/testData/incremental/pureKotlin/funRedeclaration/build.log +++ b/jps/jps-plugin/testData/incremental/pureKotlin/funRedeclaration/build.log @@ -6,4 +6,4 @@ Compiling files: src/fun2.kt End of files COMPILATION FAILED -'public fun function(): kotlin.Unit' conflicts with another declaration: public fun function(): kotlin.Unit \ No newline at end of file +'public fun function(): kotlin.Unit' conflicts with another declaration in package 'test' \ No newline at end of file diff --git a/jps/jps-plugin/testData/incremental/pureKotlin/funVsConstructorOverloadConflict/build.log b/jps/jps-plugin/testData/incremental/pureKotlin/funVsConstructorOverloadConflict/build.log index e3d39a6b779..66735e9dcd1 100644 --- a/jps/jps-plugin/testData/incremental/pureKotlin/funVsConstructorOverloadConflict/build.log +++ b/jps/jps-plugin/testData/incremental/pureKotlin/funVsConstructorOverloadConflict/build.log @@ -6,4 +6,4 @@ Compiling files: src/fun2.kt End of files COMPILATION FAILED -'public constructor function()' conflicts with another declaration: public constructor function() \ No newline at end of file +'public constructor function()' conflicts with another declaration in package 'test' \ No newline at end of file