Don't report UNUSED_PARAMETER in main from object #KT-37718 Fixed
This commit is contained in:
+5
@@ -742,6 +742,11 @@ public class FirOldFrontendDiagnosticsTestWithStdlibGenerated extends AbstractFi
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/localFun_LL13.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("mainInObject.kt")
|
||||
public void testMainInObject() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/mainInObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("property.kt")
|
||||
public void testProperty() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/property.kt");
|
||||
|
||||
@@ -745,6 +745,11 @@ class ControlFlowInformationProvider private constructor(
|
||||
}
|
||||
return
|
||||
}
|
||||
else -> {
|
||||
if (owner.containingClassOrObject != null) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (functionDescriptor.isOperator && functionName in OperatorNameConventions.DELEGATED_PROPERTY_OPERATORS) {
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// FIR_IDENTICAL
|
||||
object Test {
|
||||
@JvmStatic
|
||||
fun main(args: Array<String>) {
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package
|
||||
|
||||
public object Test {
|
||||
private constructor Test()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
@kotlin.jvm.JvmStatic public final fun main(/*0*/ args: kotlin.Array<kotlin.String>): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+5
@@ -743,6 +743,11 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/localFun_LL13.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("mainInObject.kt")
|
||||
public void testMainInObject() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/mainInObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("property.kt")
|
||||
public void testProperty() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/property.kt");
|
||||
|
||||
compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java
Generated
+5
@@ -743,6 +743,11 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/localFun_LL13.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("mainInObject.kt")
|
||||
public void testMainInObject() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/mainInObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("property.kt")
|
||||
public void testProperty() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/property.kt");
|
||||
|
||||
Reference in New Issue
Block a user