diff --git a/compiler/android-tests/tests/org/jetbrains/jet/compiler/android/SpecialFiles.java b/compiler/android-tests/tests/org/jetbrains/jet/compiler/android/SpecialFiles.java index 8d71ce43b4b..032e7e2dc85 100644 --- a/compiler/android-tests/tests/org/jetbrains/jet/compiler/android/SpecialFiles.java +++ b/compiler/android-tests/tests/org/jetbrains/jet/compiler/android/SpecialFiles.java @@ -64,7 +64,7 @@ public class SpecialFiles { excludedFiles.add("nestedInPackage.kt"); // Cannot change package name excludedFiles.add("importNestedClass.kt"); // Cannot change package name - excludedFiles.add("namespaceQualifiedMethod.kt"); // Cannot change package name + excludedFiles.add("packageQualifiedMethod.kt"); // Cannot change package name excludedFiles.add("classObjectToString.kt"); // Cannot change package name excludedFiles.add("kt326.kt"); // Commented diff --git a/compiler/testData/codegen/box/fieldRename/inNamespace.kt b/compiler/testData/codegen/box/fieldRename/inPackage.kt similarity index 100% rename from compiler/testData/codegen/box/fieldRename/inNamespace.kt rename to compiler/testData/codegen/box/fieldRename/inPackage.kt diff --git a/compiler/testData/codegen/box/namespace/boxPrimitiveTypeInClinit.kt b/compiler/testData/codegen/box/package/boxPrimitiveTypeInClinit.kt similarity index 100% rename from compiler/testData/codegen/box/namespace/boxPrimitiveTypeInClinit.kt rename to compiler/testData/codegen/box/package/boxPrimitiveTypeInClinit.kt diff --git a/compiler/testData/codegen/box/namespace/checkCast.kt b/compiler/testData/codegen/box/package/checkCast.kt similarity index 100% rename from compiler/testData/codegen/box/namespace/checkCast.kt rename to compiler/testData/codegen/box/package/checkCast.kt diff --git a/compiler/testData/codegen/box/namespace/incrementProperty.kt b/compiler/testData/codegen/box/package/incrementProperty.kt similarity index 100% rename from compiler/testData/codegen/box/namespace/incrementProperty.kt rename to compiler/testData/codegen/box/package/incrementProperty.kt diff --git a/compiler/testData/codegen/box/namespace/invokespecial.kt b/compiler/testData/codegen/box/package/invokespecial.kt similarity index 100% rename from compiler/testData/codegen/box/namespace/invokespecial.kt rename to compiler/testData/codegen/box/package/invokespecial.kt diff --git a/compiler/testData/codegen/box/namespace/nullablePrimitiveNoFieldInitializer.kt b/compiler/testData/codegen/box/package/nullablePrimitiveNoFieldInitializer.kt similarity index 100% rename from compiler/testData/codegen/box/namespace/nullablePrimitiveNoFieldInitializer.kt rename to compiler/testData/codegen/box/package/nullablePrimitiveNoFieldInitializer.kt diff --git a/compiler/testData/codegen/box/namespace/namespaceQualifiedMethod.kt b/compiler/testData/codegen/box/package/packageQualifiedMethod.kt similarity index 100% rename from compiler/testData/codegen/box/namespace/namespaceQualifiedMethod.kt rename to compiler/testData/codegen/box/package/packageQualifiedMethod.kt diff --git a/compiler/testData/codegen/box/namespace/privateTopLevelPropAndVarInInner.kt b/compiler/testData/codegen/box/package/privateTopLevelPropAndVarInInner.kt similarity index 100% rename from compiler/testData/codegen/box/namespace/privateTopLevelPropAndVarInInner.kt rename to compiler/testData/codegen/box/package/privateTopLevelPropAndVarInInner.kt diff --git a/compiler/testData/codegen/topLevelMemberInvocation/functionInMultiFileNamespace/1.kt b/compiler/testData/codegen/topLevelMemberInvocation/functionInMultiFilePackage/1.kt similarity index 100% rename from compiler/testData/codegen/topLevelMemberInvocation/functionInMultiFileNamespace/1.kt rename to compiler/testData/codegen/topLevelMemberInvocation/functionInMultiFilePackage/1.kt diff --git a/compiler/testData/codegen/topLevelMemberInvocation/functionInMultiFileNamespace/2.kt b/compiler/testData/codegen/topLevelMemberInvocation/functionInMultiFilePackage/2.kt similarity index 100% rename from compiler/testData/codegen/topLevelMemberInvocation/functionInMultiFileNamespace/2.kt rename to compiler/testData/codegen/topLevelMemberInvocation/functionInMultiFilePackage/2.kt diff --git a/compiler/testData/diagnostics/tests/Abstract.kt b/compiler/testData/diagnostics/tests/Abstract.kt index 053733611b7..57d1c773dec 100644 --- a/compiler/testData/diagnostics/tests/Abstract.kt +++ b/compiler/testData/diagnostics/tests/Abstract.kt @@ -1,5 +1,5 @@ // FILE: b.kt -package MyNamespace +package MyPackage //properties val a: Int val a1: Int = 1 diff --git a/compiler/testData/diagnostics/tests/AutocastsForStableIdentifiers.kt b/compiler/testData/diagnostics/tests/AutocastsForStableIdentifiers.kt index 5d75540f81b..108ba8f00d5 100644 --- a/compiler/testData/diagnostics/tests/AutocastsForStableIdentifiers.kt +++ b/compiler/testData/diagnostics/tests/AutocastsForStableIdentifiers.kt @@ -31,7 +31,7 @@ fun Any?.vars(a: Any?) : Int { if (example.ns.y is Int) { b = example.ns.y } -// if (namespace.bottles.ns.y is Int) { +// if (package.bottles.ns.y is Int) { // b = ns.y // } if (Obj.y is Int) { diff --git a/compiler/testData/diagnostics/tests/DelegationAndOverriding.kt b/compiler/testData/diagnostics/tests/DelegationAndOverriding.kt index 5b2c9bc2914..982b5be9039 100644 --- a/compiler/testData/diagnostics/tests/DelegationAndOverriding.kt +++ b/compiler/testData/diagnostics/tests/DelegationAndOverriding.kt @@ -1,4 +1,4 @@ -//namespace override +package override trait T { fun foo() diff --git a/compiler/testData/diagnostics/tests/NamespaceQualified.kt b/compiler/testData/diagnostics/tests/PackageQualified.kt similarity index 100% rename from compiler/testData/diagnostics/tests/NamespaceQualified.kt rename to compiler/testData/diagnostics/tests/PackageQualified.kt diff --git a/compiler/testData/diagnostics/tests/SafeCallOnFakeNamespace.kt b/compiler/testData/diagnostics/tests/SafeCallOnFakePackage.kt similarity index 100% rename from compiler/testData/diagnostics/tests/SafeCallOnFakeNamespace.kt rename to compiler/testData/diagnostics/tests/SafeCallOnFakePackage.kt diff --git a/compiler/testData/diagnostics/tests/backingField/kt462BackingFieldsResolve.kt b/compiler/testData/diagnostics/tests/backingField/kt462BackingFieldsResolve.kt index d0b5a63d6b6..b11943036ca 100644 --- a/compiler/testData/diagnostics/tests/backingField/kt462BackingFieldsResolve.kt +++ b/compiler/testData/diagnostics/tests/backingField/kt462BackingFieldsResolve.kt @@ -107,7 +107,7 @@ class TestBackingFieldsVisibility() { a.$a = 3 } - val x = $namespaceLevelVar + val x = $topLevelVar inner class Inner() { val z = this@TestBackingFieldsVisibility.$x @@ -117,7 +117,7 @@ class TestBackingFieldsVisibility() { get() = $w //test there is no second error here } -val namespaceLevelVar = 11 +val topLevelVar = 11 class T() { val z : Int get() = 42 diff --git a/compiler/testData/diagnostics/tests/backingField/kt782namespaceLevel.kt b/compiler/testData/diagnostics/tests/backingField/kt782packageLevel.kt similarity index 100% rename from compiler/testData/diagnostics/tests/backingField/kt782namespaceLevel.kt rename to compiler/testData/diagnostics/tests/backingField/kt782packageLevel.kt diff --git a/compiler/testData/diagnostics/tests/enum/dontCreateNamespaceTypeForEnumEntry.kt b/compiler/testData/diagnostics/tests/enum/dontCreatePackageTypeForEnumEntry.kt similarity index 100% rename from compiler/testData/diagnostics/tests/enum/dontCreateNamespaceTypeForEnumEntry.kt rename to compiler/testData/diagnostics/tests/enum/dontCreatePackageTypeForEnumEntry.kt diff --git a/compiler/testData/diagnostics/tests/overload/FunNoConflictInDifferentPackages.kt b/compiler/testData/diagnostics/tests/overload/FunNoConflictInDifferentPackages.kt index 1fc95b838f0..7ef2f1c5738 100644 --- a/compiler/testData/diagnostics/tests/overload/FunNoConflictInDifferentPackages.kt +++ b/compiler/testData/diagnostics/tests/overload/FunNoConflictInDifferentPackages.kt @@ -1,13 +1,13 @@ -// FILE: ns1.kt -// check no error in overload in different namespaces +// FILE: pkg1.kt +// check no error in overload in different packages -package ns1 +package pkg1 fun e() = 1 -// FILE: ns2.kt -package ns2 +// FILE: pkg2.kt +package pkg2 fun e() = 1 -// FILE: ns3ns1.kt -package ns3.ns1 +// FILE: pkg3pkg1.kt +package pkg3.pkg1 fun e() = 1 diff --git a/compiler/testData/diagnostics/tests/regressions/kt328.kt b/compiler/testData/diagnostics/tests/regressions/kt328.kt index 59a9f9b57b7..7683337e73e 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt328.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt328.kt @@ -14,7 +14,7 @@ class A() { val x = { x } } -//in a namespace +//in a package val x = { x } //KT-787 AssertionError on code 'val x = x' diff --git a/compiler/testData/psi/NamespaceBlockFirst.kt b/compiler/testData/psi/PackageBlockFirst.kt similarity index 100% rename from compiler/testData/psi/NamespaceBlockFirst.kt rename to compiler/testData/psi/PackageBlockFirst.kt diff --git a/compiler/testData/psi/NamespaceBlockFirst.txt b/compiler/testData/psi/PackageBlockFirst.txt similarity index 97% rename from compiler/testData/psi/NamespaceBlockFirst.txt rename to compiler/testData/psi/PackageBlockFirst.txt index aa622f10109..b01c659dc87 100644 --- a/compiler/testData/psi/NamespaceBlockFirst.txt +++ b/compiler/testData/psi/PackageBlockFirst.txt @@ -1,4 +1,4 @@ -JetFile: NamespaceBlockFirst.kt +JetFile: PackageBlockFirst.kt PACKAGE_DIRECTIVE PsiErrorElement:Expecting package directive or top level declaration diff --git a/compiler/testData/psi/NamespaceModifiers.kt b/compiler/testData/psi/PackageModifiers.kt similarity index 100% rename from compiler/testData/psi/NamespaceModifiers.kt rename to compiler/testData/psi/PackageModifiers.kt diff --git a/compiler/testData/psi/NamespaceModifiers.txt b/compiler/testData/psi/PackageModifiers.txt similarity index 94% rename from compiler/testData/psi/NamespaceModifiers.txt rename to compiler/testData/psi/PackageModifiers.txt index 0b02368e48c..6616e5b9075 100644 --- a/compiler/testData/psi/NamespaceModifiers.txt +++ b/compiler/testData/psi/PackageModifiers.txt @@ -1,4 +1,4 @@ -JetFile: NamespaceModifiers.kt +JetFile: PackageModifiers.kt PACKAGE_DIRECTIVE MODIFIER_LIST PsiElement(public)('public') diff --git a/compiler/testData/psi/QuotedIdentifiers.kt b/compiler/testData/psi/QuotedIdentifiers.kt index d878c2ee8fa..35382188e82 100644 --- a/compiler/testData/psi/QuotedIdentifiers.kt +++ b/compiler/testData/psi/QuotedIdentifiers.kt @@ -1,4 +1,4 @@ -[`return`] fun `namespace`() { +[`return`] fun `package`() { `class`() } diff --git a/compiler/testData/psi/QuotedIdentifiers.txt b/compiler/testData/psi/QuotedIdentifiers.txt index bbada0daf89..97d86abf76b 100644 --- a/compiler/testData/psi/QuotedIdentifiers.txt +++ b/compiler/testData/psi/QuotedIdentifiers.txt @@ -15,7 +15,7 @@ JetFile: QuotedIdentifiers.kt PsiWhiteSpace(' ') PsiElement(fun)('fun') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('`namespace`') + PsiElement(IDENTIFIER)('`package`') VALUE_PARAMETER_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') diff --git a/compiler/testData/psi/greatSyntacticShift/functionTypes.kt b/compiler/testData/psi/greatSyntacticShift/functionTypes.kt index a48befe3580..206cc1e36e5 100644 --- a/compiler/testData/psi/greatSyntacticShift/functionTypes.kt +++ b/compiler/testData/psi/greatSyntacticShift/functionTypes.kt @@ -6,7 +6,7 @@ package n { } abstract class XXX() { abstract val a : Int - abstract val a1 : namespace.Int + abstract val a1 : package.Int abstract val a2 : n.B abstract val a3 : (A) abstract val a31 : (n.B) diff --git a/compiler/testData/psi/greatSyntacticShift/functionTypes.txt b/compiler/testData/psi/greatSyntacticShift/functionTypes.txt index 1d2f2f55d61..d1d35aeeb5b 100644 --- a/compiler/testData/psi/greatSyntacticShift/functionTypes.txt +++ b/compiler/testData/psi/greatSyntacticShift/functionTypes.txt @@ -74,9 +74,7 @@ JetFile: functionTypes.kt PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('namespace') + PsiElement(package)('package') PsiElement(DOT)('.') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('Int') diff --git a/compiler/testData/resolve/Namespaces.resolve b/compiler/testData/resolve/Packages.resolve similarity index 100% rename from compiler/testData/resolve/Namespaces.resolve rename to compiler/testData/resolve/Packages.resolve diff --git a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java index f4f4a4926ac..ea29668fff2 100644 --- a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java @@ -309,11 +309,6 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest { doTest("compiler/testData/diagnostics/tests/NamedArgumentsAndDefaultValues.kt"); } - @TestMetadata("NamespaceQualified.kt") - public void testNamespaceQualified() throws Exception { - doTest("compiler/testData/diagnostics/tests/NamespaceQualified.kt"); - } - @TestMetadata("Nullability.kt") public void testNullability() throws Exception { doTest("compiler/testData/diagnostics/tests/Nullability.kt"); @@ -344,6 +339,11 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest { doTest("compiler/testData/diagnostics/tests/PackageInExpressionPosition.kt"); } + @TestMetadata("PackageQualified.kt") + public void testPackageQualified() throws Exception { + doTest("compiler/testData/diagnostics/tests/PackageQualified.kt"); + } + @TestMetadata("PrimaryConstructors.kt") public void testPrimaryConstructors() throws Exception { doTest("compiler/testData/diagnostics/tests/PrimaryConstructors.kt"); @@ -404,9 +404,9 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest { doTest("compiler/testData/diagnostics/tests/SafeCallNonNullReceiverReturnNull.kt"); } - @TestMetadata("SafeCallOnFakeNamespace.kt") - public void testSafeCallOnFakeNamespace() throws Exception { - doTest("compiler/testData/diagnostics/tests/SafeCallOnFakeNamespace.kt"); + @TestMetadata("SafeCallOnFakePackage.kt") + public void testSafeCallOnFakePackage() throws Exception { + doTest("compiler/testData/diagnostics/tests/SafeCallOnFakePackage.kt"); } @TestMetadata("ShiftFunctionTypes.kt") @@ -688,9 +688,9 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest { doTest("compiler/testData/diagnostics/tests/backingField/kt462BackingFieldsResolve.kt"); } - @TestMetadata("kt782namespaceLevel.kt") - public void testKt782namespaceLevel() throws Exception { - doTest("compiler/testData/diagnostics/tests/backingField/kt782namespaceLevel.kt"); + @TestMetadata("kt782packageLevel.kt") + public void testKt782packageLevel() throws Exception { + doTest("compiler/testData/diagnostics/tests/backingField/kt782packageLevel.kt"); } @TestMetadata("qualifiedWithThis.kt") @@ -2652,9 +2652,9 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest { doTest("compiler/testData/diagnostics/tests/enum/classObjectOfPrivateEnum.kt"); } - @TestMetadata("dontCreateNamespaceTypeForEnumEntry.kt") - public void testDontCreateNamespaceTypeForEnumEntry() throws Exception { - doTest("compiler/testData/diagnostics/tests/enum/dontCreateNamespaceTypeForEnumEntry.kt"); + @TestMetadata("dontCreatePackageTypeForEnumEntry.kt") + public void testDontCreatePackageTypeForEnumEntry() throws Exception { + doTest("compiler/testData/diagnostics/tests/enum/dontCreatePackageTypeForEnumEntry.kt"); } @TestMetadata("entryShouldBeOfEnumType.kt") diff --git a/compiler/tests/org/jetbrains/jet/codegen/TopLevelMembersInvocationTestGenerated.java b/compiler/tests/org/jetbrains/jet/codegen/TopLevelMembersInvocationTestGenerated.java index de65e02ea86..06d22345d52 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/TopLevelMembersInvocationTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/codegen/TopLevelMembersInvocationTestGenerated.java @@ -46,9 +46,9 @@ public class TopLevelMembersInvocationTestGenerated extends AbstractTopLevelMemb doTest("compiler/testData/codegen/topLevelMemberInvocation/functionDifferentPackage"); } - @TestMetadata("functionInMultiFileNamespace") - public void testFunctionInMultiFileNamespace() throws Exception { - doTest("compiler/testData/codegen/topLevelMemberInvocation/functionInMultiFileNamespace"); + @TestMetadata("functionInMultiFilePackage") + public void testFunctionInMultiFilePackage() throws Exception { + doTest("compiler/testData/codegen/topLevelMemberInvocation/functionInMultiFilePackage"); } @TestMetadata("functionSamePackage") diff --git a/compiler/tests/org/jetbrains/jet/codegen/generated/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/jet/codegen/generated/BlackBoxCodegenTestGenerated.java index dc2fbd8f2f4..f20caa0e3fc 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/generated/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/codegen/generated/BlackBoxCodegenTestGenerated.java @@ -31,7 +31,7 @@ import org.jetbrains.jet.codegen.generated.AbstractBlackBoxCodegenTest; /** This class is generated by {@link org.jetbrains.jet.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") @TestMetadata("compiler/testData/codegen/box") -@InnerTestClasses({BlackBoxCodegenTestGenerated.Arrays.class, BlackBoxCodegenTestGenerated.BinaryOp.class, BlackBoxCodegenTestGenerated.Bridges.class, BlackBoxCodegenTestGenerated.BuiltinStubMethods.class, BlackBoxCodegenTestGenerated.CallableReference.class, BlackBoxCodegenTestGenerated.Casts.class, BlackBoxCodegenTestGenerated.Classes.class, BlackBoxCodegenTestGenerated.Closures.class, BlackBoxCodegenTestGenerated.Constants.class, BlackBoxCodegenTestGenerated.ControlStructures.class, BlackBoxCodegenTestGenerated.DefaultArguments.class, BlackBoxCodegenTestGenerated.DelegatedProperty.class, BlackBoxCodegenTestGenerated.Elvis.class, BlackBoxCodegenTestGenerated.Enum.class, BlackBoxCodegenTestGenerated.ExclExcl.class, BlackBoxCodegenTestGenerated.ExtensionFunctions.class, BlackBoxCodegenTestGenerated.ExtensionProperties.class, BlackBoxCodegenTestGenerated.FakeOverride.class, BlackBoxCodegenTestGenerated.FieldRename.class, BlackBoxCodegenTestGenerated.Finally.class, BlackBoxCodegenTestGenerated.Functions.class, BlackBoxCodegenTestGenerated.InnerNested.class, BlackBoxCodegenTestGenerated.Instructions.class, BlackBoxCodegenTestGenerated.Intrinsics.class, BlackBoxCodegenTestGenerated.Labels.class, BlackBoxCodegenTestGenerated.LocalClasses.class, BlackBoxCodegenTestGenerated.MultiDecl.class, BlackBoxCodegenTestGenerated.Namespace.class, BlackBoxCodegenTestGenerated.Objects.class, BlackBoxCodegenTestGenerated.OperatorConventions.class, BlackBoxCodegenTestGenerated.PrimitiveTypes.class, BlackBoxCodegenTestGenerated.Properties.class, BlackBoxCodegenTestGenerated.Reflection.class, BlackBoxCodegenTestGenerated.SafeCall.class, BlackBoxCodegenTestGenerated.SamConstructors.class, BlackBoxCodegenTestGenerated.Strings.class, BlackBoxCodegenTestGenerated.Super.class, BlackBoxCodegenTestGenerated.ToArray.class, BlackBoxCodegenTestGenerated.Traits.class, BlackBoxCodegenTestGenerated.TypeInfo.class, BlackBoxCodegenTestGenerated.TypeMapping.class, BlackBoxCodegenTestGenerated.UnaryOp.class, BlackBoxCodegenTestGenerated.Unit.class, BlackBoxCodegenTestGenerated.Vararg.class, BlackBoxCodegenTestGenerated.When.class}) +@InnerTestClasses({BlackBoxCodegenTestGenerated.Arrays.class, BlackBoxCodegenTestGenerated.BinaryOp.class, BlackBoxCodegenTestGenerated.Bridges.class, BlackBoxCodegenTestGenerated.BuiltinStubMethods.class, BlackBoxCodegenTestGenerated.CallableReference.class, BlackBoxCodegenTestGenerated.Casts.class, BlackBoxCodegenTestGenerated.Classes.class, BlackBoxCodegenTestGenerated.Closures.class, BlackBoxCodegenTestGenerated.Constants.class, BlackBoxCodegenTestGenerated.ControlStructures.class, BlackBoxCodegenTestGenerated.DefaultArguments.class, BlackBoxCodegenTestGenerated.DelegatedProperty.class, BlackBoxCodegenTestGenerated.Elvis.class, BlackBoxCodegenTestGenerated.Enum.class, BlackBoxCodegenTestGenerated.ExclExcl.class, BlackBoxCodegenTestGenerated.ExtensionFunctions.class, BlackBoxCodegenTestGenerated.ExtensionProperties.class, BlackBoxCodegenTestGenerated.FakeOverride.class, BlackBoxCodegenTestGenerated.FieldRename.class, BlackBoxCodegenTestGenerated.Finally.class, BlackBoxCodegenTestGenerated.Functions.class, BlackBoxCodegenTestGenerated.InnerNested.class, BlackBoxCodegenTestGenerated.Instructions.class, BlackBoxCodegenTestGenerated.Intrinsics.class, BlackBoxCodegenTestGenerated.Labels.class, BlackBoxCodegenTestGenerated.LocalClasses.class, BlackBoxCodegenTestGenerated.MultiDecl.class, BlackBoxCodegenTestGenerated.Objects.class, BlackBoxCodegenTestGenerated.OperatorConventions.class, BlackBoxCodegenTestGenerated.Package.class, BlackBoxCodegenTestGenerated.PrimitiveTypes.class, BlackBoxCodegenTestGenerated.Properties.class, BlackBoxCodegenTestGenerated.Reflection.class, BlackBoxCodegenTestGenerated.SafeCall.class, BlackBoxCodegenTestGenerated.SamConstructors.class, BlackBoxCodegenTestGenerated.Strings.class, BlackBoxCodegenTestGenerated.Super.class, BlackBoxCodegenTestGenerated.ToArray.class, BlackBoxCodegenTestGenerated.Traits.class, BlackBoxCodegenTestGenerated.TypeInfo.class, BlackBoxCodegenTestGenerated.TypeMapping.class, BlackBoxCodegenTestGenerated.UnaryOp.class, BlackBoxCodegenTestGenerated.Unit.class, BlackBoxCodegenTestGenerated.Vararg.class, BlackBoxCodegenTestGenerated.When.class}) public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { public void testAllFilesPresentInBox() throws Exception { JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), true); @@ -2506,9 +2506,9 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { doTest("compiler/testData/codegen/box/fieldRename/genericPropertyWithItself.kt"); } - @TestMetadata("inNamespace.kt") - public void testInNamespace() throws Exception { - doTest("compiler/testData/codegen/box/fieldRename/inNamespace.kt"); + @TestMetadata("inPackage.kt") + public void testInPackage() throws Exception { + doTest("compiler/testData/codegen/box/fieldRename/inPackage.kt"); } @TestMetadata("simple.kt") @@ -3837,49 +3837,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } } - @TestMetadata("compiler/testData/codegen/box/namespace") - public static class Namespace extends AbstractBlackBoxCodegenTest { - public void testAllFilesPresentInNamespace() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/codegen/box/namespace"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("boxPrimitiveTypeInClinit.kt") - public void testBoxPrimitiveTypeInClinit() throws Exception { - doTest("compiler/testData/codegen/box/namespace/boxPrimitiveTypeInClinit.kt"); - } - - @TestMetadata("checkCast.kt") - public void testCheckCast() throws Exception { - doTest("compiler/testData/codegen/box/namespace/checkCast.kt"); - } - - @TestMetadata("incrementProperty.kt") - public void testIncrementProperty() throws Exception { - doTest("compiler/testData/codegen/box/namespace/incrementProperty.kt"); - } - - @TestMetadata("invokespecial.kt") - public void testInvokespecial() throws Exception { - doTest("compiler/testData/codegen/box/namespace/invokespecial.kt"); - } - - @TestMetadata("namespaceQualifiedMethod.kt") - public void testNamespaceQualifiedMethod() throws Exception { - doTest("compiler/testData/codegen/box/namespace/namespaceQualifiedMethod.kt"); - } - - @TestMetadata("nullablePrimitiveNoFieldInitializer.kt") - public void testNullablePrimitiveNoFieldInitializer() throws Exception { - doTest("compiler/testData/codegen/box/namespace/nullablePrimitiveNoFieldInitializer.kt"); - } - - @TestMetadata("privateTopLevelPropAndVarInInner.kt") - public void testPrivateTopLevelPropAndVarInInner() throws Exception { - doTest("compiler/testData/codegen/box/namespace/privateTopLevelPropAndVarInInner.kt"); - } - - } - @TestMetadata("compiler/testData/codegen/box/objects") public static class Objects extends AbstractBlackBoxCodegenTest { public void testAllFilesPresentInObjects() throws Exception { @@ -4116,6 +4073,49 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } } + @TestMetadata("compiler/testData/codegen/box/package") + public static class Package extends AbstractBlackBoxCodegenTest { + public void testAllFilesPresentInPackage() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/codegen/box/package"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("boxPrimitiveTypeInClinit.kt") + public void testBoxPrimitiveTypeInClinit() throws Exception { + doTest("compiler/testData/codegen/box/package/boxPrimitiveTypeInClinit.kt"); + } + + @TestMetadata("checkCast.kt") + public void testCheckCast() throws Exception { + doTest("compiler/testData/codegen/box/package/checkCast.kt"); + } + + @TestMetadata("incrementProperty.kt") + public void testIncrementProperty() throws Exception { + doTest("compiler/testData/codegen/box/package/incrementProperty.kt"); + } + + @TestMetadata("invokespecial.kt") + public void testInvokespecial() throws Exception { + doTest("compiler/testData/codegen/box/package/invokespecial.kt"); + } + + @TestMetadata("nullablePrimitiveNoFieldInitializer.kt") + public void testNullablePrimitiveNoFieldInitializer() throws Exception { + doTest("compiler/testData/codegen/box/package/nullablePrimitiveNoFieldInitializer.kt"); + } + + @TestMetadata("packageQualifiedMethod.kt") + public void testPackageQualifiedMethod() throws Exception { + doTest("compiler/testData/codegen/box/package/packageQualifiedMethod.kt"); + } + + @TestMetadata("privateTopLevelPropAndVarInInner.kt") + public void testPrivateTopLevelPropAndVarInInner() throws Exception { + doTest("compiler/testData/codegen/box/package/privateTopLevelPropAndVarInInner.kt"); + } + + } + @TestMetadata("compiler/testData/codegen/box/primitiveTypes") public static class PrimitiveTypes extends AbstractBlackBoxCodegenTest { public void testAllFilesPresentInPrimitiveTypes() throws Exception { @@ -5246,9 +5246,9 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { suite.addTestSuite(Labels.class); suite.addTestSuite(LocalClasses.class); suite.addTest(MultiDecl.innerSuite()); - suite.addTestSuite(Namespace.class); suite.addTestSuite(Objects.class); suite.addTest(OperatorConventions.innerSuite()); + suite.addTestSuite(Package.class); suite.addTestSuite(PrimitiveTypes.class); suite.addTestSuite(Properties.class); suite.addTestSuite(Reflection.class); diff --git a/compiler/tests/org/jetbrains/jet/parsing/JetParsingTestGenerated.java b/compiler/tests/org/jetbrains/jet/parsing/JetParsingTestGenerated.java index 3cda834b809..e7c5900fdd1 100644 --- a/compiler/tests/org/jetbrains/jet/parsing/JetParsingTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/parsing/JetParsingTestGenerated.java @@ -267,16 +267,6 @@ public class JetParsingTestGenerated extends AbstractJetParsingTest { doParsingTest("compiler/testData/psi/MultiVariableDeclarations.kt"); } - @TestMetadata("NamespaceBlockFirst.kt") - public void testNamespaceBlockFirst() throws Exception { - doParsingTest("compiler/testData/psi/NamespaceBlockFirst.kt"); - } - - @TestMetadata("NamespaceModifiers.kt") - public void testNamespaceModifiers() throws Exception { - doParsingTest("compiler/testData/psi/NamespaceModifiers.kt"); - } - @TestMetadata("NestedComments.kt") public void testNestedComments() throws Exception { doParsingTest("compiler/testData/psi/NestedComments.kt"); @@ -302,6 +292,16 @@ public class JetParsingTestGenerated extends AbstractJetParsingTest { doParsingTest("compiler/testData/psi/ObjectLiteralAsStatement.kt"); } + @TestMetadata("PackageBlockFirst.kt") + public void testPackageBlockFirst() throws Exception { + doParsingTest("compiler/testData/psi/PackageBlockFirst.kt"); + } + + @TestMetadata("PackageModifiers.kt") + public void testPackageModifiers() throws Exception { + doParsingTest("compiler/testData/psi/PackageModifiers.kt"); + } + @TestMetadata("ParameterNameMising.kt") public void testParameterNameMising() throws Exception { doParsingTest("compiler/testData/psi/ParameterNameMising.kt"); diff --git a/compiler/tests/org/jetbrains/jet/resolve/ResolveTestGenerated.java b/compiler/tests/org/jetbrains/jet/resolve/ResolveTestGenerated.java index 385322ae20a..65abb5cb5ca 100644 --- a/compiler/tests/org/jetbrains/jet/resolve/ResolveTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/resolve/ResolveTestGenerated.java @@ -82,11 +82,6 @@ public class ResolveTestGenerated extends AbstractResolveTest { doTest("compiler/testData/resolve/LocalObjects.resolve"); } - @TestMetadata("Namespaces.resolve") - public void testNamespaces() throws Exception { - doTest("compiler/testData/resolve/Namespaces.resolve"); - } - @TestMetadata("NestedObjects.resolve") public void testNestedObjects() throws Exception { doTest("compiler/testData/resolve/NestedObjects.resolve"); @@ -102,6 +97,11 @@ public class ResolveTestGenerated extends AbstractResolveTest { doTest("compiler/testData/resolve/Objects.resolve"); } + @TestMetadata("Packages.resolve") + public void testPackages() throws Exception { + doTest("compiler/testData/resolve/Packages.resolve"); + } + @TestMetadata("PrimaryConstructorParameters.resolve") public void testPrimaryConstructorParameters() throws Exception { doTest("compiler/testData/resolve/PrimaryConstructorParameters.resolve"); diff --git a/idea/testData/checker/Abstract.kt b/idea/testData/checker/Abstract.kt index 0bd15ad48b3..1ee2a9f0b59 100644 --- a/idea/testData/checker/Abstract.kt +++ b/idea/testData/checker/Abstract.kt @@ -118,34 +118,32 @@ enum class MyEnum() { abstract enum class MyAbstractEnum() {} -//package MyNamespace { - //properties - val a: Int - val a1: Int = 1 - abstract val a2: Int - abstract val a3: Int = 1 +//properties +val a: Int +val a1: Int = 1 +abstract val a2: Int +abstract val a3: Int = 1 - var b: Int private set - var b1: Int = 0; private set - abstract var b2: Int private set - abstract var b3: Int = 0; private set +var b: Int private set +var b1: Int = 0; private set +abstract var b2: Int private set +abstract var b3: Int = 0; private set - var c: Int set(v: Int) { $c = v } - var c1: Int = 0; set(v: Int) { $c1 = v } - abstract var c2: Int set(v: Int) { $c2 = v } - abstract var c3: Int = 0; set(v: Int) { $c3 = v } +var c: Int set(v: Int) { $c = v } +var c1: Int = 0; set(v: Int) { $c1 = v } +abstract var c2: Int set(v: Int) { $c2 = v } +abstract var c3: Int = 0; set(v: Int) { $c3 = v } - val e: Int get() = a - val e1: Int = 0; get() = a - abstract val e2: Int get() = a - abstract val e3: Int = 0; get() = a +val e: Int get() = a +val e1: Int = 0; get() = a +abstract val e2: Int get() = a +abstract val e3: Int = 0; get() = a - //methods - fun f() - fun g() {} - abstract fun h() - abstract fun j() {} -//} +//methods +fun f() +fun g() {} +abstract fun h() +abstract fun j() {} //creating an instance abstract class B1( diff --git a/idea/testData/checker/NamespaceAsExpression.kt b/idea/testData/checker/PackageAsExpression.kt similarity index 100% rename from idea/testData/checker/NamespaceAsExpression.kt rename to idea/testData/checker/PackageAsExpression.kt diff --git a/idea/testData/checker/NamespaceQualified.kt b/idea/testData/checker/PackageQualified.kt similarity index 100% rename from idea/testData/checker/NamespaceQualified.kt rename to idea/testData/checker/PackageQualified.kt diff --git a/idea/testData/completion/basic/common/InMiddleOfNamespace.kt b/idea/testData/completion/basic/common/InMiddleOfPackageDirective.kt similarity index 100% rename from idea/testData/completion/basic/common/InMiddleOfNamespace.kt rename to idea/testData/completion/basic/common/InMiddleOfPackageDirective.kt diff --git a/idea/testData/completion/basic/common/JavaPackage.kt b/idea/testData/completion/basic/common/JavaPackage.kt index d18da32f63e..3879365ae51 100644 --- a/idea/testData/completion/basic/common/JavaPackage.kt +++ b/idea/testData/completion/basic/common/JavaPackage.kt @@ -3,4 +3,4 @@ package Tests class A : java. // EXIST: lang, util, io -// ABSENT: fun, val, var, namespace +// ABSENT: fun, val, var, package diff --git a/idea/testData/completion/basic/common/NoEmptyNamespace.kt b/idea/testData/completion/basic/common/NoEmptyPackage.kt similarity index 100% rename from idea/testData/completion/basic/common/NoEmptyNamespace.kt rename to idea/testData/completion/basic/common/NoEmptyPackage.kt diff --git a/idea/testData/completion/injava/ClassFromNamespace.java b/idea/testData/completion/injava/ClassFromPackage.java similarity index 100% rename from idea/testData/completion/injava/ClassFromNamespace.java rename to idea/testData/completion/injava/ClassFromPackage.java diff --git a/idea/testData/completion/injava/ClassFromNamespace.kt b/idea/testData/completion/injava/ClassFromPackage.kt similarity index 100% rename from idea/testData/completion/injava/ClassFromNamespace.kt rename to idea/testData/completion/injava/ClassFromPackage.kt diff --git a/idea/testData/completion/keywords/AfterDot.kt b/idea/testData/completion/keywords/AfterDot.kt index f6d11044f90..033e493b284 100644 --- a/idea/testData/completion/keywords/AfterDot.kt +++ b/idea/testData/completion/keywords/AfterDot.kt @@ -3,7 +3,7 @@ fun foo() { str. } -// ABSENT: namespace, as, type, class, this, super, val, var, fun, for, null, true +// ABSENT: package, as, type, class, this, super, val, var, fun, for, null, true // ABSENT: false, is, in, throw, return, break, continue, object, if, try, else, while // ABSENT: do, when, trait, This diff --git a/idea/testData/debugger/multiFileNamespace/a.kt b/idea/testData/debugger/multiFilePackage/a.kt similarity index 100% rename from idea/testData/debugger/multiFileNamespace/a.kt rename to idea/testData/debugger/multiFilePackage/a.kt diff --git a/idea/testData/debugger/multiFileNamespace/b.kt b/idea/testData/debugger/multiFilePackage/b.kt similarity index 100% rename from idea/testData/debugger/multiFileNamespace/b.kt rename to idea/testData/debugger/multiFilePackage/b.kt diff --git a/idea/testData/debugger/namespaceOfPackage.kt b/idea/testData/debugger/namespaceOfPackage.kt deleted file mode 100644 index 8cf5e0c6fcf..00000000000 --- a/idea/testData/debugger/namespaceOfPackage.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -fun foo() { - "" // test/TestPackage-namespaceOfPackage -} diff --git a/idea/testData/debugger/package.kt b/idea/testData/debugger/package.kt new file mode 100644 index 00000000000..0c8eb48663f --- /dev/null +++ b/idea/testData/debugger/package.kt @@ -0,0 +1,5 @@ +package test + +fun foo() { + "" // test/TestPackage-package +} diff --git a/idea/testData/highlighter/Enums.kt b/idea/testData/highlighter/Enums.kt index a4b56322e5b..50c1ec9e3e2 100644 --- a/idea/testData/highlighter/Enums.kt +++ b/idea/testData/highlighter/Enums.kt @@ -7,5 +7,5 @@ package testing fun testing(t1: Test, t2: Test): Test { if (t1 != t2) return Test.FIRST - return testing(Test.FIRST, Test.SECOND) + return testing(Test.FIRST, Test.SECOND) } \ No newline at end of file diff --git a/idea/testData/highlighter/Functions.kt b/idea/testData/highlighter/Functions.kt index 1028ad0fab2..3a5391fe9fa 100644 --- a/idea/testData/highlighter/Functions.kt +++ b/idea/testData/highlighter/Functions.kt @@ -10,8 +10,8 @@ fun Int.open class Container { open fun member() { - global() - 5.ext() + global() + 5.ext() member() } } diff --git a/idea/testData/highlighter/Variables.kt b/idea/testData/highlighter/Variables.kt index 1244882eda4..dc985c3af94 100644 --- a/idea/testData/highlighter/Variables.kt +++ b/idea/testData/highlighter/Variables.kt @@ -1,13 +1,13 @@ -var x = 5 +var x = 5 -val Int.sq : Int +val Int.sq : Int get() { return this * this } -val y : Int = 1 +val y : Int = 1 get() { - return 5.sq + $y + x + return 5.sq + $y + x } class Foo(val a : Int, b : String) { diff --git a/idea/testData/highlighter/VariablesAsFunctions.kt b/idea/testData/highlighter/VariablesAsFunctions.kt index 029a52de78e..68468e40d80 100644 --- a/idea/testData/highlighter/VariablesAsFunctions.kt +++ b/idea/testData/highlighter/VariablesAsFunctions.kt @@ -3,9 +3,9 @@ trait FunctionLike { } } -var global : () -> Unit = {} +var global : () -> Unit = {} -val Int.ext : () -> Unit +val Int.ext : () -> Unit get() { return {} } @@ -13,8 +13,8 @@ val Int.foo(a : () -> Unit, functionLike: FunctionLike) { a() functionLike() - global() - 1.ext(); + global() + 1.ext(); {}() //should not be highlighted as "calling variable as function"! } \ No newline at end of file diff --git a/idea/tests/org/jetbrains/jet/checkers/JetPsiCheckerTestGenerated.java b/idea/tests/org/jetbrains/jet/checkers/JetPsiCheckerTestGenerated.java index 09c85adeb3d..c5a2d454587 100644 --- a/idea/tests/org/jetbrains/jet/checkers/JetPsiCheckerTestGenerated.java +++ b/idea/tests/org/jetbrains/jet/checkers/JetPsiCheckerTestGenerated.java @@ -143,16 +143,6 @@ public class JetPsiCheckerTestGenerated extends AbstractJetPsiCheckerTest { doTest("idea/testData/checker/MultipleBounds.kt"); } - @TestMetadata("NamespaceAsExpression.kt") - public void testNamespaceAsExpression() throws Exception { - doTest("idea/testData/checker/NamespaceAsExpression.kt"); - } - - @TestMetadata("NamespaceQualified.kt") - public void testNamespaceQualified() throws Exception { - doTest("idea/testData/checker/NamespaceQualified.kt"); - } - @TestMetadata("NestedObjects.kt") public void testNestedObjects() throws Exception { doTest("idea/testData/checker/NestedObjects.kt"); @@ -183,6 +173,16 @@ public class JetPsiCheckerTestGenerated extends AbstractJetPsiCheckerTest { doTest("idea/testData/checker/OverridesAndGenerics.kt"); } + @TestMetadata("PackageAsExpression.kt") + public void testPackageAsExpression() throws Exception { + doTest("idea/testData/checker/PackageAsExpression.kt"); + } + + @TestMetadata("PackageQualified.kt") + public void testPackageQualified() throws Exception { + doTest("idea/testData/checker/PackageQualified.kt"); + } + @TestMetadata("PrimaryConstructors.kt") public void testPrimaryConstructors() throws Exception { doTest("idea/testData/checker/PrimaryConstructors.kt"); diff --git a/idea/tests/org/jetbrains/jet/completion/JSBasicCompletionTestGenerated.java b/idea/tests/org/jetbrains/jet/completion/JSBasicCompletionTestGenerated.java index 1d38ab59b54..144f73ea2c7 100644 --- a/idea/tests/org/jetbrains/jet/completion/JSBasicCompletionTestGenerated.java +++ b/idea/tests/org/jetbrains/jet/completion/JSBasicCompletionTestGenerated.java @@ -259,16 +259,16 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes doTest("idea/testData/completion/basic/common/InLongDotQualifiedExpression.kt"); } - @TestMetadata("InMiddleOfNamespace.kt") - public void testInMiddleOfNamespace() throws Exception { - doTest("idea/testData/completion/basic/common/InMiddleOfNamespace.kt"); - } - @TestMetadata("InMiddleOfPackage.kt") public void testInMiddleOfPackage() throws Exception { doTest("idea/testData/completion/basic/common/InMiddleOfPackage.kt"); } + @TestMetadata("InMiddleOfPackageDirective.kt") + public void testInMiddleOfPackageDirective() throws Exception { + doTest("idea/testData/completion/basic/common/InMiddleOfPackageDirective.kt"); + } + @TestMetadata("InObjectInDelegationSpecifier.kt") public void testInObjectInDelegationSpecifier() throws Exception { doTest("idea/testData/completion/basic/common/InObjectInDelegationSpecifier.kt"); @@ -334,9 +334,9 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes doTest("idea/testData/completion/basic/common/NoCompletionAfterLong.kt"); } - @TestMetadata("NoEmptyNamespace.kt") - public void testNoEmptyNamespace() throws Exception { - doTest("idea/testData/completion/basic/common/NoEmptyNamespace.kt"); + @TestMetadata("NoEmptyPackage.kt") + public void testNoEmptyPackage() throws Exception { + doTest("idea/testData/completion/basic/common/NoEmptyPackage.kt"); } @TestMetadata("NoObjectInTypePosition.kt") diff --git a/idea/tests/org/jetbrains/jet/completion/JetInJavaCompletionTest.java b/idea/tests/org/jetbrains/jet/completion/JetInJavaCompletionTest.java index c74ef63fdbc..f252b8249df 100644 --- a/idea/tests/org/jetbrains/jet/completion/JetInJavaCompletionTest.java +++ b/idea/tests/org/jetbrains/jet/completion/JetInJavaCompletionTest.java @@ -28,7 +28,7 @@ public class JetInJavaCompletionTest extends JetCompletionMultiTestBase { doFileTest(); } - public void testClassFromNamespace() { + public void testClassFromPackage() { doFileTest(); } diff --git a/idea/tests/org/jetbrains/jet/completion/JvmBasicCompletionTestGenerated.java b/idea/tests/org/jetbrains/jet/completion/JvmBasicCompletionTestGenerated.java index 594dcd071fd..766eaf44edd 100644 --- a/idea/tests/org/jetbrains/jet/completion/JvmBasicCompletionTestGenerated.java +++ b/idea/tests/org/jetbrains/jet/completion/JvmBasicCompletionTestGenerated.java @@ -259,16 +259,16 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT doTest("idea/testData/completion/basic/common/InLongDotQualifiedExpression.kt"); } - @TestMetadata("InMiddleOfNamespace.kt") - public void testInMiddleOfNamespace() throws Exception { - doTest("idea/testData/completion/basic/common/InMiddleOfNamespace.kt"); - } - @TestMetadata("InMiddleOfPackage.kt") public void testInMiddleOfPackage() throws Exception { doTest("idea/testData/completion/basic/common/InMiddleOfPackage.kt"); } + @TestMetadata("InMiddleOfPackageDirective.kt") + public void testInMiddleOfPackageDirective() throws Exception { + doTest("idea/testData/completion/basic/common/InMiddleOfPackageDirective.kt"); + } + @TestMetadata("InObjectInDelegationSpecifier.kt") public void testInObjectInDelegationSpecifier() throws Exception { doTest("idea/testData/completion/basic/common/InObjectInDelegationSpecifier.kt"); @@ -334,9 +334,9 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT doTest("idea/testData/completion/basic/common/NoCompletionAfterLong.kt"); } - @TestMetadata("NoEmptyNamespace.kt") - public void testNoEmptyNamespace() throws Exception { - doTest("idea/testData/completion/basic/common/NoEmptyNamespace.kt"); + @TestMetadata("NoEmptyPackage.kt") + public void testNoEmptyPackage() throws Exception { + doTest("idea/testData/completion/basic/common/NoEmptyPackage.kt"); } @TestMetadata("NoObjectInTypePosition.kt") diff --git a/idea/tests/org/jetbrains/jet/plugin/debugger/JetPositionManagerTest.java b/idea/tests/org/jetbrains/jet/plugin/debugger/JetPositionManagerTest.java index 7d82dea10be..128dbbed446 100644 --- a/idea/tests/org/jetbrains/jet/plugin/debugger/JetPositionManagerTest.java +++ b/idea/tests/org/jetbrains/jet/plugin/debugger/JetPositionManagerTest.java @@ -59,7 +59,7 @@ public class JetPositionManagerTest extends PositionManagerTestCase { return positionManager; } - public void testMultiFileNamespace() { + public void testMultiFilePackage() { doMultiTest(); } @@ -99,7 +99,7 @@ public class JetPositionManagerTest extends PositionManagerTestCase { doTest(); } - public void testNamespaceOfPackage() { + public void testPackage() { doTest(); } diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/KotlinLibTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/KotlinLibTest.java index 6cef6879d3b..4d98ea65fa8 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/KotlinLibTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/KotlinLibTest.java @@ -29,13 +29,13 @@ public final class KotlinLibTest extends SingleFileTranslationTest { super("kotlinLib/"); } - public void testNamespaceHasDeclaredFunction() throws Exception { - runJavascriptTest("namespace.js"); + public void testPackageHasDeclaredFunction() throws Exception { + runJavascriptTest("package.js"); } - public void testNamespaceHasDeclaredClasses() throws Exception { - runJavascriptTest("namespaceWithClasses.js"); + public void testPackageHasDeclaredClasses() throws Exception { + runJavascriptTest("packageWithClasses.js"); } diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/MiscTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/MiscTest.java index 8fb87d98bfb..31bdb26cf47 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/MiscTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/MiscTest.java @@ -41,8 +41,8 @@ public final class MiscTest extends AbstractExpressionTest { fooBoxTest(); } - public void testClassWithoutNamespace() throws Exception { - runFunctionOutputTest("classWithoutNamespace.kt", Namer.getRootPackageName(), "box", true); + public void testClassWithoutPackage() throws Exception { + runFunctionOutputTest("classWithoutPackage.kt", Namer.getRootPackageName(), "box", true); } public void testIfElseAsExpressionWithThrow() throws Exception { @@ -103,15 +103,15 @@ public final class MiscTest extends AbstractExpressionTest { fooBoxTest(); } - public void testNamespacePropertyCalledAsFun() throws Exception { + public void testPackagePropertyCalledAsFun() throws Exception { fooBoxTest(); } - public void testExtensionLiteralCreatedAtNamespaceLevel() throws Exception { + public void testExtensionLiteralCreatedAtPackageLevel() throws Exception { fooBoxTest(); } - public void testTemporaryVariableCreatedInNamespaceInitializer() throws Exception { + public void testTemporaryVariableCreatedInPackageInitializer() throws Exception { fooBoxTest(); } @@ -131,8 +131,8 @@ public final class MiscTest extends AbstractExpressionTest { checkFooBoxIsTrue("KT-1865.kt"); } - public void testMainFunInNestedNamespace() throws Exception { - checkOutput("mainFunInNestedNamespace.kt", "ayee"); + public void testMainFunInNestedPackage() throws Exception { + checkOutput("mainFunInNestedPackage.kt", "ayee"); } @@ -149,14 +149,14 @@ public final class MiscTest extends AbstractExpressionTest { fooBoxTest(); } - public void testNamespaceLevelVarInPackage() throws Exception { + public void testPackageLevelVarInPackage() throws Exception { fooBoxIsValue("OK"); } //TODO: see http://youtrack.jetbrains.com/issue/KT-2564 @SuppressWarnings("UnusedDeclaration") - public void TODO_testNamespaceLevelVarInRoot() throws Exception { - runFunctionOutputTest("namespaceLevelVarInRoot.kt", Namer.getRootPackageName(), "box", "OK"); + public void TODO_testPackageLevelVarInRoot() throws Exception { + runFunctionOutputTest("packageLevelVarInRoot.kt", Namer.getRootPackageName(), "box", "OK"); } public void testLazyPropertyGetterNotCalledOnStart() throws Exception { diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/MultiNamespaceTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/MultiNamespaceTest.java deleted file mode 100644 index 2312f213bf6..00000000000 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/MultiNamespaceTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2010-2013 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.k2js.test.semantics; - -import org.jetbrains.k2js.test.MultipleFilesTranslationTest; - -public class MultiNamespaceTest extends MultipleFilesTranslationTest { - - - public MultiNamespaceTest() { - super("multiNamespace/"); - } - - public void testFunctionsVisibleFromOtherNamespace() throws Exception { - checkFooBoxIsTrue("functionsVisibleFromOtherNamespace"); - } - - //TODO: fails on centos-1 build agent, can't reproduce - public void TODO_testClassesInheritedFromOtherNamespace() throws Exception { - checkFooBoxIsTrue("classesInheritedFromOtherNamespace"); - } - - public void testNamespaceVariableVisibleFromOtherNamespace() throws Exception { - checkFooBoxIsTrue("namespaceVariableVisibleFromOtherNamespace"); - } - - public void testNestedNamespaceFunctionCalledFromOtherNamespace() throws Exception { - runMultiFileTest("nestedNamespaceFunctionCalledFromOtherNamespace", "a.foo", "box", true); - } - - public void testSubnamespacesWithClashingNames() throws Exception { - runMultiFileTest("subnamespacesWithClashingNames", "a.foo", "box", true); - } - - public void testSubnamespacesWithClashingNamesUsingImport() throws Exception { - runMultiFileTest("subnamespacesWithClashingNamesUsingImport", "a.foo", "box", true); - } - - public void testCreateClassFromOtherNamespace() throws Exception { - runMultiFileTest("createClassFromOtherNamespace", "a.foo", "box", true); - } - - public void testCreateClassFromOtherNamespaceUsingImport() throws Exception { - runMultiFileTest("createClassFromOtherNamespaceUsingImport", "a.foo", "box", true); - } -} - diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/MultiPackageTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/MultiPackageTest.java new file mode 100644 index 00000000000..d3ed50ac02e --- /dev/null +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/MultiPackageTest.java @@ -0,0 +1,61 @@ +/* + * Copyright 2010-2013 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.k2js.test.semantics; + +import org.jetbrains.k2js.test.MultipleFilesTranslationTest; + +public class MultiPackageTest extends MultipleFilesTranslationTest { + + + public MultiPackageTest() { + super("multiPackage/"); + } + + public void testFunctionsVisibleFromOtherPackage() throws Exception { + checkFooBoxIsTrue("functionsVisibleFromOtherPackage"); + } + + //TODO: fails on centos-1 build agent, can't reproduce + public void TODO_testClassesInheritedFromOtherPackage() throws Exception { + checkFooBoxIsTrue("classesInheritedFromOtherPackage"); + } + + public void testPackageVariableVisibleFromOtherPackage() throws Exception { + checkFooBoxIsTrue("PackageVariableVisibleFromOtherPackage"); + } + + public void testNestedPackageFunctionCalledFromOtherPackage() throws Exception { + runMultiFileTest("nestedPackageFunctionCalledFromOtherPackage", "a.foo", "box", true); + } + + public void testSubPackagesWithClashingNames() throws Exception { + runMultiFileTest("subPackagesWithClashingNames", "a.foo", "box", true); + } + + public void testSubPackagesWithClashingNamesUsingImport() throws Exception { + runMultiFileTest("subPackagesWithClashingNamesUsingImport", "a.foo", "box", true); + } + + public void testCreateClassFromOtherPackage() throws Exception { + runMultiFileTest("createClassFromOtherPackage", "a.foo", "box", true); + } + + public void testCreateClassFromOtherPackageUsingImport() throws Exception { + runMultiFileTest("createClassFromOtherPackageUsingImport", "a.foo", "box", true); + } +} + diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/NamespaceTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/NamespaceTest.java deleted file mode 100644 index 84700e5746d..00000000000 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/NamespaceTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2010-2013 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.k2js.test.semantics; - -import org.jetbrains.k2js.test.SingleFileTranslationTest; - -public final class NamespaceTest extends SingleFileTranslationTest { - public NamespaceTest() { - super("namespace/"); - } - - public void testNestedNamespace() throws Exception { - runFunctionOutputTest("nestedNamespace.kt", "foo.bar", "box", true); - } - - public void testDeeplyNestedNamespace() throws Exception { - runFunctionOutputTest("deeplyNestedNamespace.kt", "foo1.foo2.foo3.foo5.foo6.foo7.foo8", "box", true); - } - - public void testDeeplyNestedNamespaceFunctionCalled() throws Exception { - runFunctionOutputTest("deeplyNestedNamespaceFunctionCalled.kt", "foo1.foo2.foo3.foo5.foo6.foo7.foo8", "box", true - ); - } - - public void testClassCreatedInDeeplyNestedNamespace() throws Exception { - runFunctionOutputTest("classCreatedInDeeplyNestedNamespace.kt", "foo1.foo2.foo3.foo5.foo6.foo7.foo8", "box", true - ); - } - - public void testInitializersOfNestedNamespacesExecute() throws Exception { - runFunctionOutputTest("initializersOfNestedNamespacesExecute.kt", "foo1.foo2.foo3.foo5.foo6.foo7.foo8", "box", true - ); - } -} diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/PackageTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/PackageTest.java new file mode 100644 index 00000000000..046a79f1998 --- /dev/null +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/PackageTest.java @@ -0,0 +1,48 @@ +/* + * Copyright 2010-2013 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.k2js.test.semantics; + +import org.jetbrains.k2js.test.SingleFileTranslationTest; + +public final class PackageTest extends SingleFileTranslationTest { + public PackageTest() { + super("package/"); + } + + public void testNestedPackage() throws Exception { + runFunctionOutputTest("nestedPackage.kt", "foo.bar", "box", true); + } + + public void testDeeplyNestedPackage() throws Exception { + runFunctionOutputTest("deeplyNestedPackage.kt", "foo1.foo2.foo3.foo5.foo6.foo7.foo8", "box", true); + } + + public void testDeeplyNestedPackageFunctionCalled() throws Exception { + runFunctionOutputTest("deeplyNestedPackageFunctionCalled.kt", "foo1.foo2.foo3.foo5.foo6.foo7.foo8", "box", true + ); + } + + public void testClassCreatedInDeeplyNestedPackage() throws Exception { + runFunctionOutputTest("classCreatedInDeeplyNestedPackage.kt", "foo1.foo2.foo3.foo5.foo6.foo7.foo8", "box", true + ); + } + + public void testInitializersOfNestedPackagesExecute() throws Exception { + runFunctionOutputTest("initializersOfNestedPackagesExecute.kt", "foo1.foo2.foo3.foo5.foo6.foo7.foo8", "box", true + ); + } +} diff --git a/js/js.tests/test/org/jetbrains/k2js/test/semantics/PropertyAccessTest.java b/js/js.tests/test/org/jetbrains/k2js/test/semantics/PropertyAccessTest.java index 244ebc221b9..3c1a3586408 100644 --- a/js/js.tests/test/org/jetbrains/k2js/test/semantics/PropertyAccessTest.java +++ b/js/js.tests/test/org/jetbrains/k2js/test/semantics/PropertyAccessTest.java @@ -56,21 +56,21 @@ public final class PropertyAccessTest extends SingleFileTranslationTest { fooBoxTest(); } - public void testNamespacePropertyInitializer() throws Exception { + public void testPackagePropertyInitializer() throws Exception { fooBoxTest(); } - public void testNamespacePropertySet() throws Exception { + public void testPackagePropertySet() throws Exception { fooBoxTest(); } - public void testNamespaceCustomAccessors() throws Exception { + public void testPackageCustomAccessors() throws Exception { fooBoxTest(); } - public void testClassUsesNamespaceProperties() throws Exception { + public void testClassUsesPackageProperties() throws Exception { fooBoxTest(); } diff --git a/js/js.translator/testFiles/expression/misc/cases/classWithoutNamespace.kt b/js/js.translator/testFiles/expression/misc/cases/classWithoutPackage.kt similarity index 100% rename from js/js.translator/testFiles/expression/misc/cases/classWithoutNamespace.kt rename to js/js.translator/testFiles/expression/misc/cases/classWithoutPackage.kt diff --git a/js/js.translator/testFiles/expression/misc/cases/extensionLiteralCreatedAtNamespaceLevel.kt b/js/js.translator/testFiles/expression/misc/cases/extensionLiteralCreatedAtPackageLevel.kt similarity index 100% rename from js/js.translator/testFiles/expression/misc/cases/extensionLiteralCreatedAtNamespaceLevel.kt rename to js/js.translator/testFiles/expression/misc/cases/extensionLiteralCreatedAtPackageLevel.kt diff --git a/js/js.translator/testFiles/expression/misc/cases/mainFunInNestedNamespace.kt b/js/js.translator/testFiles/expression/misc/cases/mainFunInNestedPackage.kt similarity index 100% rename from js/js.translator/testFiles/expression/misc/cases/mainFunInNestedNamespace.kt rename to js/js.translator/testFiles/expression/misc/cases/mainFunInNestedPackage.kt diff --git a/js/js.translator/testFiles/expression/misc/cases/namespaceLevelVarInPackage.kt b/js/js.translator/testFiles/expression/misc/cases/packageLevelVarInPackage.kt similarity index 100% rename from js/js.translator/testFiles/expression/misc/cases/namespaceLevelVarInPackage.kt rename to js/js.translator/testFiles/expression/misc/cases/packageLevelVarInPackage.kt diff --git a/js/js.translator/testFiles/expression/misc/cases/namespaceLevelVarInRoot.kt b/js/js.translator/testFiles/expression/misc/cases/packageLevelVarInRoot.kt similarity index 100% rename from js/js.translator/testFiles/expression/misc/cases/namespaceLevelVarInRoot.kt rename to js/js.translator/testFiles/expression/misc/cases/packageLevelVarInRoot.kt diff --git a/js/js.translator/testFiles/expression/misc/cases/namespacePropertyCalledAsFun.kt b/js/js.translator/testFiles/expression/misc/cases/packagePropertyCalledAsFun.kt similarity index 100% rename from js/js.translator/testFiles/expression/misc/cases/namespacePropertyCalledAsFun.kt rename to js/js.translator/testFiles/expression/misc/cases/packagePropertyCalledAsFun.kt diff --git a/js/js.translator/testFiles/expression/misc/cases/temporaryVariableCreatedInNamespaceInitializer.kt b/js/js.translator/testFiles/expression/misc/cases/temporaryVariableCreatedInPackageInitializer.kt similarity index 100% rename from js/js.translator/testFiles/expression/misc/cases/temporaryVariableCreatedInNamespaceInitializer.kt rename to js/js.translator/testFiles/expression/misc/cases/temporaryVariableCreatedInPackageInitializer.kt diff --git a/js/js.translator/testFiles/kotlinLib/cases/namespace.js b/js/js.translator/testFiles/kotlinLib/cases/package.js similarity index 100% rename from js/js.translator/testFiles/kotlinLib/cases/namespace.js rename to js/js.translator/testFiles/kotlinLib/cases/package.js diff --git a/js/js.translator/testFiles/kotlinLib/cases/namespaceWithClasses.js b/js/js.translator/testFiles/kotlinLib/cases/packageWithClasses.js similarity index 100% rename from js/js.translator/testFiles/kotlinLib/cases/namespaceWithClasses.js rename to js/js.translator/testFiles/kotlinLib/cases/packageWithClasses.js diff --git a/js/js.translator/testFiles/multiNamespace/cases/classesInheritedFromOtherNamespace/a.kt b/js/js.translator/testFiles/multiPackage/cases/classesInheritedFromOtherPackage/a.kt similarity index 100% rename from js/js.translator/testFiles/multiNamespace/cases/classesInheritedFromOtherNamespace/a.kt rename to js/js.translator/testFiles/multiPackage/cases/classesInheritedFromOtherPackage/a.kt diff --git a/js/js.translator/testFiles/multiNamespace/cases/classesInheritedFromOtherNamespace/b.kt b/js/js.translator/testFiles/multiPackage/cases/classesInheritedFromOtherPackage/b.kt similarity index 100% rename from js/js.translator/testFiles/multiNamespace/cases/classesInheritedFromOtherNamespace/b.kt rename to js/js.translator/testFiles/multiPackage/cases/classesInheritedFromOtherPackage/b.kt diff --git a/js/js.translator/testFiles/multiNamespace/cases/createClassFromOtherNamespace/a.kt b/js/js.translator/testFiles/multiPackage/cases/createClassFromOtherPackage/a.kt similarity index 100% rename from js/js.translator/testFiles/multiNamespace/cases/createClassFromOtherNamespace/a.kt rename to js/js.translator/testFiles/multiPackage/cases/createClassFromOtherPackage/a.kt diff --git a/js/js.translator/testFiles/multiNamespace/cases/createClassFromOtherNamespace/b.kt b/js/js.translator/testFiles/multiPackage/cases/createClassFromOtherPackage/b.kt similarity index 100% rename from js/js.translator/testFiles/multiNamespace/cases/createClassFromOtherNamespace/b.kt rename to js/js.translator/testFiles/multiPackage/cases/createClassFromOtherPackage/b.kt diff --git a/js/js.translator/testFiles/multiNamespace/cases/createClassFromOtherNamespaceUsingImport/a.kt b/js/js.translator/testFiles/multiPackage/cases/createClassFromOtherPackageUsingImport/a.kt similarity index 100% rename from js/js.translator/testFiles/multiNamespace/cases/createClassFromOtherNamespaceUsingImport/a.kt rename to js/js.translator/testFiles/multiPackage/cases/createClassFromOtherPackageUsingImport/a.kt diff --git a/js/js.translator/testFiles/multiNamespace/cases/createClassFromOtherNamespaceUsingImport/b.kt b/js/js.translator/testFiles/multiPackage/cases/createClassFromOtherPackageUsingImport/b.kt similarity index 100% rename from js/js.translator/testFiles/multiNamespace/cases/createClassFromOtherNamespaceUsingImport/b.kt rename to js/js.translator/testFiles/multiPackage/cases/createClassFromOtherPackageUsingImport/b.kt diff --git a/js/js.translator/testFiles/multiNamespace/cases/functionsVisibleFromOtherNamespace/a.kt b/js/js.translator/testFiles/multiPackage/cases/functionsVisibleFromOtherPackage/a.kt similarity index 100% rename from js/js.translator/testFiles/multiNamespace/cases/functionsVisibleFromOtherNamespace/a.kt rename to js/js.translator/testFiles/multiPackage/cases/functionsVisibleFromOtherPackage/a.kt diff --git a/js/js.translator/testFiles/multiNamespace/cases/functionsVisibleFromOtherNamespace/b.kt b/js/js.translator/testFiles/multiPackage/cases/functionsVisibleFromOtherPackage/b.kt similarity index 100% rename from js/js.translator/testFiles/multiNamespace/cases/functionsVisibleFromOtherNamespace/b.kt rename to js/js.translator/testFiles/multiPackage/cases/functionsVisibleFromOtherPackage/b.kt diff --git a/js/js.translator/testFiles/multiNamespace/cases/nestedNamespaceFunctionCalledFromOtherNamespace/a.kt b/js/js.translator/testFiles/multiPackage/cases/nestedPackageFunctionCalledFromOtherPackage/a.kt similarity index 100% rename from js/js.translator/testFiles/multiNamespace/cases/nestedNamespaceFunctionCalledFromOtherNamespace/a.kt rename to js/js.translator/testFiles/multiPackage/cases/nestedPackageFunctionCalledFromOtherPackage/a.kt diff --git a/js/js.translator/testFiles/multiNamespace/cases/nestedNamespaceFunctionCalledFromOtherNamespace/b.kt b/js/js.translator/testFiles/multiPackage/cases/nestedPackageFunctionCalledFromOtherPackage/b.kt similarity index 100% rename from js/js.translator/testFiles/multiNamespace/cases/nestedNamespaceFunctionCalledFromOtherNamespace/b.kt rename to js/js.translator/testFiles/multiPackage/cases/nestedPackageFunctionCalledFromOtherPackage/b.kt diff --git a/js/js.translator/testFiles/multiNamespace/cases/namespaceVariableVisibleFromOtherNamespace/a.kt b/js/js.translator/testFiles/multiPackage/cases/packageVariableVisibleFromOtherPackage/a.kt similarity index 100% rename from js/js.translator/testFiles/multiNamespace/cases/namespaceVariableVisibleFromOtherNamespace/a.kt rename to js/js.translator/testFiles/multiPackage/cases/packageVariableVisibleFromOtherPackage/a.kt diff --git a/js/js.translator/testFiles/multiNamespace/cases/namespaceVariableVisibleFromOtherNamespace/b.kt b/js/js.translator/testFiles/multiPackage/cases/packageVariableVisibleFromOtherPackage/b.kt similarity index 100% rename from js/js.translator/testFiles/multiNamespace/cases/namespaceVariableVisibleFromOtherNamespace/b.kt rename to js/js.translator/testFiles/multiPackage/cases/packageVariableVisibleFromOtherPackage/b.kt diff --git a/js/js.translator/testFiles/multiNamespace/cases/subnamespacesWithClashingNames/a.kt b/js/js.translator/testFiles/multiPackage/cases/subpackagesWithClashingNames/a.kt similarity index 100% rename from js/js.translator/testFiles/multiNamespace/cases/subnamespacesWithClashingNames/a.kt rename to js/js.translator/testFiles/multiPackage/cases/subpackagesWithClashingNames/a.kt diff --git a/js/js.translator/testFiles/multiNamespace/cases/subnamespacesWithClashingNames/b.kt b/js/js.translator/testFiles/multiPackage/cases/subpackagesWithClashingNames/b.kt similarity index 100% rename from js/js.translator/testFiles/multiNamespace/cases/subnamespacesWithClashingNames/b.kt rename to js/js.translator/testFiles/multiPackage/cases/subpackagesWithClashingNames/b.kt diff --git a/js/js.translator/testFiles/multiNamespace/cases/subnamespacesWithClashingNamesUsingImport/a.kt b/js/js.translator/testFiles/multiPackage/cases/subpackagesWithClashingNamesUsingImport/a.kt similarity index 100% rename from js/js.translator/testFiles/multiNamespace/cases/subnamespacesWithClashingNamesUsingImport/a.kt rename to js/js.translator/testFiles/multiPackage/cases/subpackagesWithClashingNamesUsingImport/a.kt diff --git a/js/js.translator/testFiles/multiNamespace/cases/subnamespacesWithClashingNamesUsingImport/b.kt b/js/js.translator/testFiles/multiPackage/cases/subpackagesWithClashingNamesUsingImport/b.kt similarity index 100% rename from js/js.translator/testFiles/multiNamespace/cases/subnamespacesWithClashingNamesUsingImport/b.kt rename to js/js.translator/testFiles/multiPackage/cases/subpackagesWithClashingNamesUsingImport/b.kt diff --git a/js/js.translator/testFiles/namespace/cases/classCreatedInDeeplyNestedNamespace.kt b/js/js.translator/testFiles/package/cases/classCreatedInDeeplyNestedPackage.kt similarity index 100% rename from js/js.translator/testFiles/namespace/cases/classCreatedInDeeplyNestedNamespace.kt rename to js/js.translator/testFiles/package/cases/classCreatedInDeeplyNestedPackage.kt diff --git a/js/js.translator/testFiles/namespace/cases/deeplyNestedNamespace.kt b/js/js.translator/testFiles/package/cases/deeplyNestedPackage.kt similarity index 100% rename from js/js.translator/testFiles/namespace/cases/deeplyNestedNamespace.kt rename to js/js.translator/testFiles/package/cases/deeplyNestedPackage.kt diff --git a/js/js.translator/testFiles/namespace/cases/deeplyNestedNamespaceFunctionCalled.kt b/js/js.translator/testFiles/package/cases/deeplyNestedPackageFunctionCalled.kt similarity index 100% rename from js/js.translator/testFiles/namespace/cases/deeplyNestedNamespaceFunctionCalled.kt rename to js/js.translator/testFiles/package/cases/deeplyNestedPackageFunctionCalled.kt diff --git a/js/js.translator/testFiles/namespace/cases/initializersOfNestedNamespacesExecute.kt b/js/js.translator/testFiles/package/cases/initializersOfNestedPackagesExecute.kt similarity index 100% rename from js/js.translator/testFiles/namespace/cases/initializersOfNestedNamespacesExecute.kt rename to js/js.translator/testFiles/package/cases/initializersOfNestedPackagesExecute.kt diff --git a/js/js.translator/testFiles/namespace/cases/nestedNamespace.kt b/js/js.translator/testFiles/package/cases/nestedPackage.kt similarity index 100% rename from js/js.translator/testFiles/namespace/cases/nestedNamespace.kt rename to js/js.translator/testFiles/package/cases/nestedPackage.kt diff --git a/js/js.translator/testFiles/propertyAccess/cases/classUsesNamespaceProperties.kt b/js/js.translator/testFiles/propertyAccess/cases/classUsesPackageProperties.kt similarity index 100% rename from js/js.translator/testFiles/propertyAccess/cases/classUsesNamespaceProperties.kt rename to js/js.translator/testFiles/propertyAccess/cases/classUsesPackageProperties.kt diff --git a/js/js.translator/testFiles/propertyAccess/cases/namespaceCustomAccessors.kt b/js/js.translator/testFiles/propertyAccess/cases/packageCustomAccessors.kt similarity index 100% rename from js/js.translator/testFiles/propertyAccess/cases/namespaceCustomAccessors.kt rename to js/js.translator/testFiles/propertyAccess/cases/packageCustomAccessors.kt diff --git a/js/js.translator/testFiles/propertyAccess/cases/namespacePropertyInitializer.kt b/js/js.translator/testFiles/propertyAccess/cases/packagePropertyInitializer.kt similarity index 100% rename from js/js.translator/testFiles/propertyAccess/cases/namespacePropertyInitializer.kt rename to js/js.translator/testFiles/propertyAccess/cases/packagePropertyInitializer.kt diff --git a/js/js.translator/testFiles/propertyAccess/cases/namespacePropertySet.kt b/js/js.translator/testFiles/propertyAccess/cases/packagePropertySet.kt similarity index 100% rename from js/js.translator/testFiles/propertyAccess/cases/namespacePropertySet.kt rename to js/js.translator/testFiles/propertyAccess/cases/packagePropertySet.kt diff --git a/libraries/sandbox/templatelib/src/TemplateCore.kt b/libraries/sandbox/templatelib/src/TemplateCore.kt index 345a81bf95b..089455e5795 100644 --- a/libraries/sandbox/templatelib/src/TemplateCore.kt +++ b/libraries/sandbox/templatelib/src/TemplateCore.kt @@ -6,7 +6,7 @@ import kotlin.io.* * Represents a generic API to templates which should be usable * in JavaScript in a browser or on the server side stand alone or in a web app etc. * - * To make things easier to implement in JS this namespace won't refer to any java.io or servlet + * To make things easier to implement in JS this package won't refer to any java.io or servlet * stuff */ trait Template { diff --git a/libraries/tools/kdoc/src/main/kotlin/org/jetbrains/kotlin/doc/model/KotlinModel.kt b/libraries/tools/kdoc/src/main/kotlin/org/jetbrains/kotlin/doc/model/KotlinModel.kt index 77ee2966cac..64c6845e307 100644 --- a/libraries/tools/kdoc/src/main/kotlin/org/jetbrains/kotlin/doc/model/KotlinModel.kt +++ b/libraries/tools/kdoc/src/main/kotlin/org/jetbrains/kotlin/doc/model/KotlinModel.kt @@ -247,7 +247,7 @@ class KModel(val context: BindingContext, val config: KDocConfig, val sourceDirs if (packageFragment != null) { allPackageFragments.add(packageFragment); } else { - warning("No NamespaceDescriptor for source $source") + warning("No PackageFragmentDescriptor for source $source") } } val allClasses = HashSet() @@ -847,7 +847,7 @@ class TemplateLinkRenderer(val annotated: KAnnotated, val template: KDocTemplate protected fun findWritableScope(declarationDescriptor: DeclarationDescriptor) : WritableScopeImpl? { val container = declarationDescriptor.getContainingDeclaration() - if (container is NamespaceDescriptor) { + if (container is PackageFragmentDescriptor) { val scope = container.getMemberScope() if (scope is WritableScopeImpl) { return scope diff --git a/libraries/tools/kdoc/src/main/kotlin/org/jetbrains/kotlin/doc/templates/KDocTemplate.kt b/libraries/tools/kdoc/src/main/kotlin/org/jetbrains/kotlin/doc/templates/KDocTemplate.kt index 231e64a8fb5..ac55e9ff9e1 100644 --- a/libraries/tools/kdoc/src/main/kotlin/org/jetbrains/kotlin/doc/templates/KDocTemplate.kt +++ b/libraries/tools/kdoc/src/main/kotlin/org/jetbrains/kotlin/doc/templates/KDocTemplate.kt @@ -91,7 +91,7 @@ abstract class KDocTemplate() : TextTemplate() { } else if (owner is KPackage) { if (!owner.useExternalLink) { // TODO how to find the function in a package??? - "${rootHref(owner)}${names.htmlSourceDirName}/namespace.html#${names.lineNumberLinkHref(f.sourceLine)}" + "${rootHref(owner)}${names.htmlSourceDirName}/package.html#${names.lineNumberLinkHref(f.sourceLine)}" } else { href(owner) } @@ -114,7 +114,7 @@ abstract class KDocTemplate() : TextTemplate() { } else if (owner is KPackage) { if (!owner.useExternalLink) { // TODO how to find the function in a package??? - "${rootHref(owner)}${names.htmlSourceDirName}/namespace.html#${names.lineNumberLinkHref(f.sourceLine)}" + "${rootHref(owner)}${names.htmlSourceDirName}/package.html#${names.lineNumberLinkHref(f.sourceLine)}" } else { href(owner) } diff --git a/libraries/tools/kdoc/src/main/kotlin/org/jetbrains/kotlin/template/TemplateCore.kt b/libraries/tools/kdoc/src/main/kotlin/org/jetbrains/kotlin/template/TemplateCore.kt index 5faf369be0d..5b53c120572 100644 --- a/libraries/tools/kdoc/src/main/kotlin/org/jetbrains/kotlin/template/TemplateCore.kt +++ b/libraries/tools/kdoc/src/main/kotlin/org/jetbrains/kotlin/template/TemplateCore.kt @@ -11,7 +11,7 @@ import java.io.Writer * Represents a generic API to templates which should be usable * in JavaScript in a browser or on the server side stand alone or in a web app etc. * -* To make things easier to implement in JS this namespace won't refer to any java.io or servlet +* To make things easier to implement in JS this package won't refer to any java.io or servlet * stuff */ trait Template {