Dropping package facades:
- light classes: do not generate light class for package facade - drop package facades as multifile classes compilation mode support - get rid of some additional package facade fqName usages - update tests for light classes
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
package test3
|
||||
|
||||
fun foo() {
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package test3
|
||||
|
||||
fun bar() {
|
||||
|
||||
}
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
package test
|
||||
|
||||
fun foo() = 42
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
package test
|
||||
|
||||
fun bar() = 239 + foo()
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
package client;
|
||||
|
||||
import server.ServerPackage;
|
||||
import server.KotlintopLevelMethodUsages_0Kt;
|
||||
|
||||
class JClient {
|
||||
String s = ServerPackage.processRequest();
|
||||
String s = KotlintopLevelMethodUsages_0Kt.processRequest();
|
||||
|
||||
String sendRequest() {
|
||||
return ServerPackage.processRequest();
|
||||
return KotlintopLevelMethodUsages_0Kt.processRequest();
|
||||
}
|
||||
}
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
package client;
|
||||
|
||||
import server.KotlinTopLevelMethodUsages_0Kt;
|
||||
|
||||
class JClient {
|
||||
String s = KotlinTopLevelMethodUsages_0Kt.processRequest();
|
||||
|
||||
String sendRequest() {
|
||||
return KotlinTopLevelMethodUsages_0Kt.processRequest();
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
package client;
|
||||
|
||||
import server.ServerPackage;
|
||||
import server.KotlinTopLevelPropertyUsages_0Kt;
|
||||
|
||||
class JClient {
|
||||
void fooBar() {
|
||||
System.out.println("foo = " + ServerPackage.getFoo());
|
||||
System.out.println("length: " + ServerPackage.getFoo().length());
|
||||
ServerPackage.setFoo("");
|
||||
System.out.println("foo = " + KotlinTopLevelPropertyUsages_0Kt.getFoo());
|
||||
System.out.println("length: " + KotlinTopLevelPropertyUsages_0Kt.getFoo().length());
|
||||
KotlinTopLevelPropertyUsages_0Kt.setFoo("");
|
||||
}
|
||||
}
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
package client;
|
||||
|
||||
import server.KotlinTopLevelPropertyUsages_0Kt;
|
||||
|
||||
class JClient {
|
||||
void fooBar() {
|
||||
System.out.println("foo = " + KotlinTopLevelPropertyUsages_0Kt.getFoo());
|
||||
System.out.println("length: " + KotlinTopLevelPropertyUsages_0Kt.getFoo().length());
|
||||
KotlinTopLevelPropertyUsages_0Kt.setFoo("");
|
||||
}
|
||||
}
|
||||
@@ -5,8 +5,8 @@ import foo.Obj;
|
||||
|
||||
class usedInJava {
|
||||
public static void main(String[] args) {
|
||||
FooPackage.getUsedByGetter();
|
||||
FooPackage.setUsedBySetter(":|");
|
||||
UsedInJavaKt.getUsedByGetter();
|
||||
UsedInJavaKt.setUsedBySetter(":|");
|
||||
System.out.println(Obj.CONST);
|
||||
}
|
||||
}
|
||||
+11
-11
@@ -2,22 +2,22 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import test.TestPackage;
|
||||
import test.*;
|
||||
|
||||
class AssignMappedKotlinType {
|
||||
void test() {
|
||||
int i1 = TestPackage.getInt();
|
||||
Integer i2 = TestPackage.getInt();
|
||||
Number number = TestPackage.getNumber();
|
||||
String str = TestPackage.getString();
|
||||
int i1 = AssignMappedKotlinTypeKt.getInt();
|
||||
Integer i2 = AssignMappedKotlinTypeKt.getInt();
|
||||
Number number = AssignMappedKotlinTypeKt.getNumber();
|
||||
String str = AssignMappedKotlinTypeKt.getString();
|
||||
|
||||
Collection<Integer> intCollection = TestPackage.getList();
|
||||
List<Integer> intList = TestPackage.getList();
|
||||
Collection<Integer> intCollection = AssignMappedKotlinTypeKt.getList();
|
||||
List<Integer> intList = AssignMappedKotlinTypeKt.getList();
|
||||
|
||||
Collection<Integer> intMutableCollection = TestPackage.getMutableList();
|
||||
List<Integer> intMutableList = TestPackage.getMutableList();
|
||||
Collection<Integer> intMutableCollection = AssignMappedKotlinTypeKt.getMutableList();
|
||||
List<Integer> intMutableList = AssignMappedKotlinTypeKt.getMutableList();
|
||||
|
||||
Collection<String> stringsCollection = TestPackage.getArrayList();
|
||||
ArrayList<String> arrayListCollection = TestPackage.getArrayList();
|
||||
Collection<String> stringsCollection = AssignMappedKotlinTypeKt.getArrayList();
|
||||
ArrayList<String> arrayListCollection = AssignMappedKotlinTypeKt.getArrayList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import test.kotlin.A;
|
||||
|
||||
import static test.kotlin.KotlinPackage.foo;
|
||||
import static test.kotlin.JvmOverloadsFunctionsKt.foo;
|
||||
|
||||
class JvmOverloadsFunctions {
|
||||
public static void main(String[] args) {
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
package test;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import test.kotlin.KotlinPackage;
|
||||
import test.kotlin.*;
|
||||
|
||||
public class TopLevelFunctionInDataFlowInspection {
|
||||
void other(@NotNull Object some) {
|
||||
Object foo = KotlinPackage.foo(some);
|
||||
Object foo = TopLevelFunctionInDataFlowInspectionKt.foo(some);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import test.TestPackage;
|
||||
package test;
|
||||
|
||||
// Check absence of 'Static method reference via subclass warning' for kotlin usages
|
||||
public class UsingKotlinPackageDeclarations {
|
||||
public static int test() {
|
||||
TestPackage.foo();
|
||||
TestPackage.setBar(15);
|
||||
return TestPackage.getBar();
|
||||
UsingKotlinPackageDeclarationsKt.foo();
|
||||
UsingKotlinPackageDeclarationsKt.setBar(15);
|
||||
return UsingKotlinPackageDeclarationsKt.getBar();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user