remove support for "package.foo.bar" syntax inside files
This commit is contained in:
@@ -144,7 +144,6 @@ public interface KtNodeTypes {
|
|||||||
KtNodeType SAFE_ACCESS_EXPRESSION = new KtNodeType("SAFE_ACCESS_EXPRESSION", KtSafeQualifiedExpression.class);
|
KtNodeType SAFE_ACCESS_EXPRESSION = new KtNodeType("SAFE_ACCESS_EXPRESSION", KtSafeQualifiedExpression.class);
|
||||||
|
|
||||||
KtNodeType OBJECT_LITERAL = new KtNodeType("OBJECT_LITERAL", KtObjectLiteralExpression.class);
|
KtNodeType OBJECT_LITERAL = new KtNodeType("OBJECT_LITERAL", KtObjectLiteralExpression.class);
|
||||||
KtNodeType ROOT_PACKAGE = new KtNodeType("ROOT_PACKAGE", KtRootPackageExpression.class);
|
|
||||||
|
|
||||||
KtNodeType WHEN = new KtNodeType("WHEN", KtWhenExpression.class);
|
KtNodeType WHEN = new KtNodeType("WHEN", KtWhenExpression.class);
|
||||||
KtNodeType WHEN_ENTRY = new KtNodeType("WHEN_ENTRY", KtWhenEntry.class);
|
KtNodeType WHEN_ENTRY = new KtNodeType("WHEN_ENTRY", KtWhenEntry.class);
|
||||||
|
|||||||
@@ -743,7 +743,6 @@ public interface Errors {
|
|||||||
DiagnosticFactory0<KtAnonymousInitializer> ANONYMOUS_INITIALIZER_IN_INTERFACE = DiagnosticFactory0.create(ERROR);
|
DiagnosticFactory0<KtAnonymousInitializer> ANONYMOUS_INITIALIZER_IN_INTERFACE = DiagnosticFactory0.create(ERROR);
|
||||||
|
|
||||||
DiagnosticFactory0<KtThisExpression> NO_THIS = DiagnosticFactory0.create(ERROR);
|
DiagnosticFactory0<KtThisExpression> NO_THIS = DiagnosticFactory0.create(ERROR);
|
||||||
DiagnosticFactory0<KtRootPackageExpression> PACKAGE_IS_NOT_AN_EXPRESSION = DiagnosticFactory0.create(ERROR);
|
|
||||||
DiagnosticFactory1<KtSimpleNameExpression, ClassifierDescriptor> NO_COMPANION_OBJECT = DiagnosticFactory1.create(ERROR);
|
DiagnosticFactory1<KtSimpleNameExpression, ClassifierDescriptor> NO_COMPANION_OBJECT = DiagnosticFactory1.create(ERROR);
|
||||||
DiagnosticFactory1<KtSimpleNameExpression, TypeParameterDescriptor> TYPE_PARAMETER_IS_NOT_AN_EXPRESSION = DiagnosticFactory1.create(ERROR);
|
DiagnosticFactory1<KtSimpleNameExpression, TypeParameterDescriptor> TYPE_PARAMETER_IS_NOT_AN_EXPRESSION = DiagnosticFactory1.create(ERROR);
|
||||||
DiagnosticFactory1<KtSimpleNameExpression, TypeParameterDescriptor> TYPE_PARAMETER_ON_LHS_OF_DOT = DiagnosticFactory1.create(ERROR);
|
DiagnosticFactory1<KtSimpleNameExpression, TypeParameterDescriptor> TYPE_PARAMETER_ON_LHS_OF_DOT = DiagnosticFactory1.create(ERROR);
|
||||||
|
|||||||
-1
@@ -305,7 +305,6 @@ public class DefaultErrorMessages {
|
|||||||
|
|
||||||
MAP.put(EQUALS_MISSING, "No method 'equals(kotlin.Any?): kotlin.Boolean' available");
|
MAP.put(EQUALS_MISSING, "No method 'equals(kotlin.Any?): kotlin.Boolean' available");
|
||||||
MAP.put(ASSIGNMENT_IN_EXPRESSION_CONTEXT, "Assignments are not expressions, and only expressions are allowed in this context");
|
MAP.put(ASSIGNMENT_IN_EXPRESSION_CONTEXT, "Assignments are not expressions, and only expressions are allowed in this context");
|
||||||
MAP.put(PACKAGE_IS_NOT_AN_EXPRESSION, "'package' is not an expression, it can only be used on the left-hand side of a dot ('.')");
|
|
||||||
MAP.put(SUPER_IS_NOT_AN_EXPRESSION, "''{0}'' is not an expression, it can only be used on the left-hand side of a dot ('.')", STRING);
|
MAP.put(SUPER_IS_NOT_AN_EXPRESSION, "''{0}'' is not an expression, it can only be used on the left-hand side of a dot ('.')", STRING);
|
||||||
MAP.put(SUPER_CANT_BE_EXTENSION_RECEIVER, "''{0}'' is not an expression, it can not be used as a receiver for extension functions", STRING);
|
MAP.put(SUPER_CANT_BE_EXTENSION_RECEIVER, "''{0}'' is not an expression, it can not be used as a receiver for extension functions", STRING);
|
||||||
MAP.put(DECLARATION_IN_ILLEGAL_CONTEXT, "Declarations are not allowed in this position");
|
MAP.put(DECLARATION_IN_ILLEGAL_CONTEXT, "Declarations are not allowed in this position");
|
||||||
|
|||||||
@@ -620,7 +620,6 @@ public class KotlinExpressionParsing extends AbstractKotlinParsing {
|
|||||||
* : functionLiteral
|
* : functionLiteral
|
||||||
* : declaration
|
* : declaration
|
||||||
* : SimpleName
|
* : SimpleName
|
||||||
* : "package" // for the root package
|
|
||||||
* ;
|
* ;
|
||||||
*/
|
*/
|
||||||
private boolean parseAtomicExpression() {
|
private boolean parseAtomicExpression() {
|
||||||
@@ -631,9 +630,6 @@ public class KotlinExpressionParsing extends AbstractKotlinParsing {
|
|||||||
if (at(LPAR)) {
|
if (at(LPAR)) {
|
||||||
parseParenthesizedExpression();
|
parseParenthesizedExpression();
|
||||||
}
|
}
|
||||||
else if (at(PACKAGE_KEYWORD)) {
|
|
||||||
parseOneTokenExpression(ROOT_PACKAGE);
|
|
||||||
}
|
|
||||||
else if (at(THIS_KEYWORD)) {
|
else if (at(THIS_KEYWORD)) {
|
||||||
parseThisExpression();
|
parseThisExpression();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2015 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.kotlin.psi;
|
|
||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
public class KtRootPackageExpression extends KtExpressionImpl {
|
|
||||||
public KtRootPackageExpression(@NotNull ASTNode node) {
|
|
||||||
super(node);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <R, D> R accept(@NotNull KtVisitor<R, D> visitor, D data) {
|
|
||||||
return visitor.visitRootPackageExpression(this, data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -302,10 +302,6 @@ public class KtVisitor<R, D> extends PsiElementVisitor {
|
|||||||
return visitExpression(expression, data);
|
return visitExpression(expression, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public R visitRootPackageExpression(@NotNull KtRootPackageExpression expression, D data) {
|
|
||||||
return visitExpression(expression, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public R visitBlockExpression(@NotNull KtBlockExpression expression, D data) {
|
public R visitBlockExpression(@NotNull KtBlockExpression expression, D data) {
|
||||||
return visitExpression(expression, data);
|
return visitExpression(expression, data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -289,10 +289,6 @@ public class KtVisitorVoid extends KtVisitor<Void, Void> {
|
|||||||
super.visitObjectLiteralExpression(expression, null);
|
super.visitObjectLiteralExpression(expression, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void visitRootPackageExpression(@NotNull KtRootPackageExpression expression) {
|
|
||||||
super.visitRootPackageExpression(expression, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void visitBlockExpression(@NotNull KtBlockExpression expression) {
|
public void visitBlockExpression(@NotNull KtBlockExpression expression) {
|
||||||
super.visitBlockExpression(expression, null);
|
super.visitBlockExpression(expression, null);
|
||||||
}
|
}
|
||||||
@@ -842,12 +838,6 @@ public class KtVisitorVoid extends KtVisitor<Void, Void> {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public final Void visitRootPackageExpression(@NotNull KtRootPackageExpression expression, Void data) {
|
|
||||||
visitRootPackageExpression(expression);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final Void visitBlockExpression(@NotNull KtBlockExpression expression, Void data) {
|
public final Void visitBlockExpression(@NotNull KtBlockExpression expression, Void data) {
|
||||||
visitBlockExpression(expression);
|
visitBlockExpression(expression);
|
||||||
|
|||||||
@@ -286,10 +286,6 @@ public class KtVisitorVoidWithParameter<P> extends KtVisitor<Void, P> {
|
|||||||
super.visitObjectLiteralExpression(expression, data);
|
super.visitObjectLiteralExpression(expression, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void visitRootPackageExpressionVoid(@NotNull KtRootPackageExpression expression, P data) {
|
|
||||||
super.visitRootPackageExpression(expression, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void visitBlockExpressionVoid(@NotNull KtBlockExpression expression, P data) {
|
public void visitBlockExpressionVoid(@NotNull KtBlockExpression expression, P data) {
|
||||||
super.visitBlockExpression(expression, data);
|
super.visitBlockExpression(expression, data);
|
||||||
}
|
}
|
||||||
@@ -809,12 +805,6 @@ public class KtVisitorVoidWithParameter<P> extends KtVisitor<Void, P> {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public final Void visitRootPackageExpression(@NotNull KtRootPackageExpression expression, P data) {
|
|
||||||
visitRootPackageExpressionVoid(expression, data);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final Void visitBlockExpression(@NotNull KtBlockExpression expression, P data) {
|
public final Void visitBlockExpression(@NotNull KtBlockExpression expression, P data) {
|
||||||
visitBlockExpressionVoid(expression, data);
|
visitBlockExpressionVoid(expression, data);
|
||||||
|
|||||||
-3
@@ -279,9 +279,6 @@ public class DataFlowValueFactory {
|
|||||||
getIdForStableIdentifier(postfixExpression.getBaseExpression(), bindingContext, containingDeclarationOrModule));
|
getIdForStableIdentifier(postfixExpression.getBaseExpression(), bindingContext, containingDeclarationOrModule));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (expression instanceof KtRootPackageExpression) {
|
|
||||||
//todo return createPackageInfo());
|
|
||||||
}
|
|
||||||
return NO_IDENTIFIER_INFO;
|
return NO_IDENTIFIER_INFO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-8
@@ -1486,14 +1486,6 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
|||||||
return TypeInfoFactoryKt.noTypeInfo(context);
|
return TypeInfoFactoryKt.noTypeInfo(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public KotlinTypeInfo visitRootPackageExpression(@NotNull KtRootPackageExpression expression, ExpressionTypingContext context) {
|
|
||||||
if (!KtPsiUtil.isLHSOfDot(expression)) {
|
|
||||||
context.trace.report(PACKAGE_IS_NOT_AN_EXPRESSION.on(expression));
|
|
||||||
}
|
|
||||||
return TypeInfoFactoryKt.noTypeInfo(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public KotlinTypeInfo visitStringTemplateExpression(
|
public KotlinTypeInfo visitStringTemplateExpression(
|
||||||
@NotNull KtStringTemplateExpression expression,
|
@NotNull KtStringTemplateExpression expression,
|
||||||
|
|||||||
-5
@@ -384,11 +384,6 @@ public abstract class ExpressionTypingVisitorDispatcher extends KtVisitor<Kotlin
|
|||||||
return basic.visitDeclaration(dcl, data);
|
return basic.visitDeclaration(dcl, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public KotlinTypeInfo visitRootPackageExpression(@NotNull KtRootPackageExpression expression, ExpressionTypingContext data) {
|
|
||||||
return basic.visitRootPackageExpression(expression, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public KotlinTypeInfo visitStringTemplateExpression(@NotNull KtStringTemplateExpression expression, ExpressionTypingContext data) {
|
public KotlinTypeInfo visitStringTemplateExpression(@NotNull KtStringTemplateExpression expression, ExpressionTypingContext data) {
|
||||||
return basic.visitStringTemplateExpression(expression, data);
|
return basic.visitStringTemplateExpression(expression, data);
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
// FILE: b.kt
|
|
||||||
package root.a
|
|
||||||
|
|
||||||
// FILE: b.kt
|
|
||||||
package root
|
|
||||||
|
|
||||||
val x = root.<!EXPRESSION_EXPECTED_PACKAGE_FOUND!>a<!>
|
|
||||||
val y2 = <!PACKAGE_IS_NOT_AN_EXPRESSION!>package<!>
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
package
|
|
||||||
|
|
||||||
package root {
|
|
||||||
public val x: [ERROR : Type for root.a]
|
|
||||||
public val y2: [ERROR : Type for package]
|
|
||||||
|
|
||||||
package root.a {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,94 +0,0 @@
|
|||||||
// MODULE: m1
|
|
||||||
// FILE: a.kt
|
|
||||||
package a.b
|
|
||||||
|
|
||||||
class c {
|
|
||||||
fun ab_c() {}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun ab_fun() {}
|
|
||||||
|
|
||||||
// MODULE: m2
|
|
||||||
// FILE: b.kt
|
|
||||||
package a
|
|
||||||
|
|
||||||
fun a_fun() {}
|
|
||||||
|
|
||||||
class b {
|
|
||||||
fun a_b() {}
|
|
||||||
|
|
||||||
class c {
|
|
||||||
fun a_bc() {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FILE: b2.kt
|
|
||||||
class x {
|
|
||||||
fun top_x() {}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// MODULE: m3(m1, m2)
|
|
||||||
// FILE: c.kt
|
|
||||||
package some
|
|
||||||
|
|
||||||
class a {
|
|
||||||
class b {
|
|
||||||
fun _ab() {}
|
|
||||||
class c {
|
|
||||||
fun _abc() {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fun _a() {}
|
|
||||||
}
|
|
||||||
|
|
||||||
class x {
|
|
||||||
fun _x() {}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun test(a_b: package.a.b) {
|
|
||||||
a_b.a_b()
|
|
||||||
a_b.<!UNRESOLVED_REFERENCE!>_ab<!>()
|
|
||||||
|
|
||||||
package.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a_fun<!>() // todo
|
|
||||||
|
|
||||||
val a_b2 = package.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>b<!>()
|
|
||||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a_b2<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a_b<!>() // todo
|
|
||||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a_b2<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>_ab<!>()
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
fun test2(ab_c: package.a.b.c) {
|
|
||||||
ab_c.ab_c()
|
|
||||||
|
|
||||||
val ab_c2 = package.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>b<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>c<!>()
|
|
||||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>ab_c2<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>ab_c<!>()
|
|
||||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>ab_c2<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a_bc<!>()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun test3(top_x: package.x) {
|
|
||||||
top_x.top_x()
|
|
||||||
|
|
||||||
val top_x2 = package.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>x<!>()
|
|
||||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>top_x2<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>top_x<!>() // todo
|
|
||||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>top_x2<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>_x<!>()
|
|
||||||
}
|
|
||||||
|
|
||||||
// FILE: c2.kt
|
|
||||||
package other
|
|
||||||
|
|
||||||
object a {
|
|
||||||
object b {
|
|
||||||
fun _ab() {}
|
|
||||||
}
|
|
||||||
fun _a() {}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
fun test(<!UNUSED_PARAMETER!>a<!>: a) {
|
|
||||||
package.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a_fun<!>() // todo
|
|
||||||
package.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>_a<!>() // todo
|
|
||||||
|
|
||||||
package.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>b<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>ab_fun<!>() // todo
|
|
||||||
package.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>b<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>_ab<!>() // todo
|
|
||||||
}
|
|
||||||
@@ -1,133 +0,0 @@
|
|||||||
// -- Module: <m1> --
|
|
||||||
package
|
|
||||||
|
|
||||||
package a {
|
|
||||||
|
|
||||||
package a.b {
|
|
||||||
public fun ab_fun(): kotlin.Unit
|
|
||||||
|
|
||||||
public final class c {
|
|
||||||
public constructor c()
|
|
||||||
public final fun ab_c(): kotlin.Unit
|
|
||||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
|
||||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
|
||||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// -- Module: <m2> --
|
|
||||||
package
|
|
||||||
|
|
||||||
public final class x {
|
|
||||||
public constructor x()
|
|
||||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
|
||||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
|
||||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
|
||||||
public final fun top_x(): kotlin.Unit
|
|
||||||
}
|
|
||||||
|
|
||||||
package a {
|
|
||||||
public fun a_fun(): kotlin.Unit
|
|
||||||
|
|
||||||
public final class b {
|
|
||||||
public constructor b()
|
|
||||||
public final fun a_b(): kotlin.Unit
|
|
||||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
|
||||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
|
||||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
|
||||||
|
|
||||||
public final class c {
|
|
||||||
public constructor c()
|
|
||||||
public final fun a_bc(): kotlin.Unit
|
|
||||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
|
||||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
|
||||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// -- Module: <m3> --
|
|
||||||
package
|
|
||||||
|
|
||||||
public final class x {
|
|
||||||
// -- Module: <m2> --
|
|
||||||
}
|
|
||||||
|
|
||||||
package a {
|
|
||||||
public fun a_fun(): kotlin.Unit
|
|
||||||
|
|
||||||
public final class b {
|
|
||||||
// -- Module: <m2> --
|
|
||||||
}
|
|
||||||
|
|
||||||
package a.b {
|
|
||||||
public fun ab_fun(): kotlin.Unit
|
|
||||||
|
|
||||||
public final class c {
|
|
||||||
// -- Module: <m1> --
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
package other {
|
|
||||||
public fun test(/*0*/ a: other.a): kotlin.Unit
|
|
||||||
|
|
||||||
public object a {
|
|
||||||
private constructor a()
|
|
||||||
public final fun _a(): kotlin.Unit
|
|
||||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
|
||||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
|
||||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
|
||||||
|
|
||||||
public object b {
|
|
||||||
private constructor b()
|
|
||||||
public final fun _ab(): kotlin.Unit
|
|
||||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
|
||||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
|
||||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
package some {
|
|
||||||
public fun test(/*0*/ a_b: a.b): kotlin.Unit
|
|
||||||
public fun test2(/*0*/ ab_c: a.b.c): kotlin.Unit
|
|
||||||
public fun test3(/*0*/ top_x: x): kotlin.Unit
|
|
||||||
|
|
||||||
public final class a {
|
|
||||||
public constructor a()
|
|
||||||
public final fun _a(): kotlin.Unit
|
|
||||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
|
||||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
|
||||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
|
||||||
|
|
||||||
public final class b {
|
|
||||||
public constructor b()
|
|
||||||
public final fun _ab(): kotlin.Unit
|
|
||||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
|
||||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
|
||||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
|
||||||
|
|
||||||
public final class c {
|
|
||||||
public constructor c()
|
|
||||||
public final fun _abc(): kotlin.Unit
|
|
||||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
|
||||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
|
||||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public final class x {
|
|
||||||
public constructor x()
|
|
||||||
public final fun _x(): kotlin.Unit
|
|
||||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
|
||||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
|
||||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Vendored
-13
@@ -1,13 +0,0 @@
|
|||||||
package foo.bar;
|
|
||||||
|
|
||||||
class X
|
|
||||||
|
|
||||||
package foo.bar {
|
|
||||||
fun foo() {
|
|
||||||
package.foo.bar.X
|
|
||||||
package.foo.bar.X()
|
|
||||||
when (e) {
|
|
||||||
is package.foo.bar.X<package.Y> -> {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-130
@@ -1,130 +0,0 @@
|
|||||||
JetFile: RootPackage.kt
|
|
||||||
PACKAGE_DIRECTIVE
|
|
||||||
PsiElement(package)('package')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
DOT_QUALIFIED_EXPRESSION
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('bar')
|
|
||||||
PsiElement(SEMICOLON)(';')
|
|
||||||
IMPORT_LIST
|
|
||||||
<empty list>
|
|
||||||
PsiWhiteSpace('\n\n')
|
|
||||||
CLASS
|
|
||||||
PsiElement(class)('class')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(IDENTIFIER)('X')
|
|
||||||
PsiWhiteSpace('\n\n')
|
|
||||||
PsiErrorElement:Expecting a top level declaration
|
|
||||||
PsiElement(package)('package')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiErrorElement:Expecting a top level declaration
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiErrorElement:Expecting a top level declaration
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
PsiErrorElement:Expecting a top level declaration
|
|
||||||
PsiElement(IDENTIFIER)('bar')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
FUN
|
|
||||||
PsiErrorElement:Expecting a top level declaration
|
|
||||||
<empty list>
|
|
||||||
BLOCK
|
|
||||||
PsiElement(LBRACE)('{')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
FUN
|
|
||||||
PsiElement(fun)('fun')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
VALUE_PARAMETER_LIST
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
BLOCK
|
|
||||||
PsiElement(LBRACE)('{')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
DOT_QUALIFIED_EXPRESSION
|
|
||||||
DOT_QUALIFIED_EXPRESSION
|
|
||||||
DOT_QUALIFIED_EXPRESSION
|
|
||||||
ROOT_PACKAGE
|
|
||||||
PsiElement(package)('package')
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('bar')
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('X')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
DOT_QUALIFIED_EXPRESSION
|
|
||||||
DOT_QUALIFIED_EXPRESSION
|
|
||||||
DOT_QUALIFIED_EXPRESSION
|
|
||||||
ROOT_PACKAGE
|
|
||||||
PsiElement(package)('package')
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('bar')
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
CALL_EXPRESSION
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('X')
|
|
||||||
VALUE_ARGUMENT_LIST
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
WHEN
|
|
||||||
PsiElement(when)('when')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('e')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(LBRACE)('{')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
WHEN_ENTRY
|
|
||||||
WHEN_CONDITION_IS_PATTERN
|
|
||||||
PsiElement(is)('is')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
TYPE_REFERENCE
|
|
||||||
USER_TYPE
|
|
||||||
USER_TYPE
|
|
||||||
USER_TYPE
|
|
||||||
PsiElement(package)('package')
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('foo')
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('bar')
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('X')
|
|
||||||
TYPE_ARGUMENT_LIST
|
|
||||||
PsiElement(LT)('<')
|
|
||||||
TYPE_PROJECTION
|
|
||||||
TYPE_REFERENCE
|
|
||||||
USER_TYPE
|
|
||||||
PsiElement(package)('package')
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('Y')
|
|
||||||
PsiElement(GT)('>')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(ARROW)('->')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
BLOCK
|
|
||||||
PsiElement(LBRACE)('{')
|
|
||||||
PsiElement(RBRACE)('}')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
PsiElement(RBRACE)('}')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
PsiElement(RBRACE)('}')
|
|
||||||
PsiWhiteSpace('\n')
|
|
||||||
PsiElement(RBRACE)('}')
|
|
||||||
@@ -463,12 +463,6 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("PackageAsExpression.kt")
|
|
||||||
public void testPackageAsExpression() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/PackageAsExpression.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("PackageInExpressionPosition.kt")
|
@TestMetadata("PackageInExpressionPosition.kt")
|
||||||
public void testPackageInExpressionPosition() throws Exception {
|
public void testPackageInExpressionPosition() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/PackageInExpressionPosition.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/PackageInExpressionPosition.kt");
|
||||||
@@ -12225,12 +12219,6 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("PackageKeyword.kt")
|
|
||||||
public void testPackageKeyword() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/qualifiedExpression/PackageKeyword.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("PackageVsClass.kt")
|
@TestMetadata("PackageVsClass.kt")
|
||||||
public void testPackageVsClass() throws Exception {
|
public void testPackageVsClass() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/qualifiedExpression/PackageVsClass.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/qualifiedExpression/PackageVsClass.kt");
|
||||||
|
|||||||
@@ -643,12 +643,6 @@ public class ParsingTestGenerated extends AbstractParsingTest {
|
|||||||
doParsingTest(fileName);
|
doParsingTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("RootPackage.kt")
|
|
||||||
public void testRootPackage() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/RootPackage.kt");
|
|
||||||
doParsingTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("SemicolonAfterIf.kt")
|
@TestMetadata("SemicolonAfterIf.kt")
|
||||||
public void testSemicolonAfterIf() throws Exception {
|
public void testSemicolonAfterIf() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/SemicolonAfterIf.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/SemicolonAfterIf.kt");
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ fun foo(p: Int) {
|
|||||||
// EXIST: if
|
// EXIST: if
|
||||||
// EXIST: null
|
// EXIST: null
|
||||||
// EXIST: object
|
// EXIST: object
|
||||||
// EXIST: package
|
|
||||||
// EXIST: return
|
// EXIST: return
|
||||||
// EXIST: super
|
// EXIST: super
|
||||||
// EXIST: throw
|
// EXIST: throw
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ fun foo() {
|
|||||||
// EXIST: if
|
// EXIST: if
|
||||||
// EXIST: null
|
// EXIST: null
|
||||||
// EXIST: object
|
// EXIST: object
|
||||||
// EXIST: package
|
|
||||||
// EXIST: return
|
// EXIST: return
|
||||||
// EXIST: super
|
// EXIST: super
|
||||||
// EXIST: throw
|
// EXIST: throw
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ fun foo() = <caret>
|
|||||||
// EXIST: if
|
// EXIST: if
|
||||||
// EXIST: null
|
// EXIST: null
|
||||||
// EXIST: object
|
// EXIST: object
|
||||||
// EXIST: package
|
|
||||||
// EXIST: super
|
// EXIST: super
|
||||||
// EXIST: throw
|
// EXIST: throw
|
||||||
// EXIST: true
|
// EXIST: true
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ val prop: Int
|
|||||||
// EXIST: if
|
// EXIST: if
|
||||||
// EXIST: null
|
// EXIST: null
|
||||||
// EXIST: object
|
// EXIST: object
|
||||||
// EXIST: package
|
|
||||||
// EXIST: super
|
// EXIST: super
|
||||||
// EXIST: throw
|
// EXIST: throw
|
||||||
// EXIST: true
|
// EXIST: true
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ fun foo(p: Int = <caret>)
|
|||||||
// EXIST: if
|
// EXIST: if
|
||||||
// EXIST: null
|
// EXIST: null
|
||||||
// EXIST: object
|
// EXIST: object
|
||||||
// EXIST: package
|
|
||||||
// EXIST: return
|
// EXIST: return
|
||||||
// EXIST: super
|
// EXIST: super
|
||||||
// EXIST: throw
|
// EXIST: throw
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ var a : Int = <caret>
|
|||||||
// EXIST: if
|
// EXIST: if
|
||||||
// EXIST: null
|
// EXIST: null
|
||||||
// EXIST: object
|
// EXIST: object
|
||||||
// EXIST: package
|
|
||||||
// EXIST: super
|
// EXIST: super
|
||||||
// EXIST: throw
|
// EXIST: throw
|
||||||
// EXIST: true
|
// EXIST: true
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
package root
|
|
||||||
|
|
||||||
val x = <error>root</error>
|
|
||||||
val y2 = <error>package</error>
|
|
||||||
@@ -217,12 +217,6 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("PackageAsExpression.kt")
|
|
||||||
public void testPackageAsExpression() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/PackageAsExpression.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("PackageQualified.kt")
|
@TestMetadata("PackageQualified.kt")
|
||||||
public void testPackageQualified() throws Exception {
|
public void testPackageQualified() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/PackageQualified.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/PackageQualified.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user