KT-11588 Type aliases
Parse type aliases as top-level, member, and local declarations.
This commit is contained in:
@@ -31,8 +31,8 @@ public interface KtNodeTypes {
|
||||
IElementType DESTRUCTURING_DECLARATION = new KtNodeType("DESTRUCTURING_DECLARATION", KtDestructuringDeclaration.class);
|
||||
IElementType DESTRUCTURING_DECLARATION_ENTRY = new KtNodeType("DESTRUCTURING_DECLARATION_ENTRY", KtDestructuringDeclarationEntry.class);
|
||||
|
||||
//KtNodeType TYPEDEF = new KtNodeType("TYPEDEF", KtTypedef.class);
|
||||
IElementType OBJECT_DECLARATION = KtStubElementTypes.OBJECT_DECLARATION;
|
||||
IElementType TYPEALIAS = KtStubElementTypes.TYPEALIAS;
|
||||
|
||||
IElementType ENUM_ENTRY = KtStubElementTypes.ENUM_ENTRY;
|
||||
IElementType CLASS_INITIALIZER = KtStubElementTypes.CLASS_INITIALIZER;
|
||||
|
||||
@@ -1256,11 +1256,9 @@ public class KotlinExpressionParsing extends AbstractKotlinParsing {
|
||||
else if (keywordToken == VAL_KEYWORD || keywordToken == VAR_KEYWORD) {
|
||||
declType = myKotlinParsing.parseProperty(true);
|
||||
}
|
||||
/*
|
||||
else if (keywordToken == TYPE_ALIAS_KEYWORD) {
|
||||
declType = myKotlinParsing.parseTypeAlias();
|
||||
}
|
||||
*/
|
||||
else if (keywordToken == OBJECT_KEYWORD) {
|
||||
// Object expression may appear at the statement position: should parse it
|
||||
// as expression instead of object declaration
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.intellij.psi.tree.IElementType;
|
||||
import com.intellij.psi.tree.TokenSet;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.KtNodeType;
|
||||
import org.jetbrains.kotlin.lexer.KtKeywordToken;
|
||||
import org.jetbrains.kotlin.lexer.KtTokens;
|
||||
|
||||
@@ -422,11 +423,9 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
||||
else if (keywordToken == VAL_KEYWORD || keywordToken == VAR_KEYWORD) {
|
||||
declType = parseProperty();
|
||||
}
|
||||
/*
|
||||
else if (keywordToken == TYPE_ALIAS_KEYWORD) {
|
||||
declType = parseTypeAlias();
|
||||
}
|
||||
*/
|
||||
else if (keywordToken == OBJECT_KEYWORD) {
|
||||
parseObject(NameParsingMode.REQUIRED, true);
|
||||
declType = OBJECT_DECLARATION;
|
||||
@@ -1085,11 +1084,9 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
||||
else if (keywordToken == VAL_KEYWORD || keywordToken == VAR_KEYWORD) {
|
||||
declType = parseProperty();
|
||||
}
|
||||
/*
|
||||
else if (keywordToken == TYPE_ALIAS_KEYWORD) {
|
||||
declType = parseTypeAlias();
|
||||
}
|
||||
*/
|
||||
else if (keywordToken == OBJECT_KEYWORD) {
|
||||
parseObject(isDefault ? NameParsingMode.ALLOWED : NameParsingMode.REQUIRED, true);
|
||||
declType = OBJECT_DECLARATION;
|
||||
@@ -1189,17 +1186,17 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
||||
|
||||
/*
|
||||
* typeAlias
|
||||
* : modifiers "typealias" SimpleName (typeParameters typeConstraints)? "=" type
|
||||
* : modifiers "typealias" SimpleName typeParameters? "=" type
|
||||
* ;
|
||||
*/
|
||||
/*
|
||||
KtNodeType parseTypeAlias() {
|
||||
IElementType parseTypeAlias() {
|
||||
assert _at(TYPE_ALIAS_KEYWORD);
|
||||
|
||||
advance(); // TYPE_ALIAS_KEYWORD
|
||||
|
||||
expect(IDENTIFIER, "Type name expected", TokenSet.orSet(TokenSet.create(LT, EQ, SEMICOLON), TOP_LEVEL_DECLARATION_FIRST));
|
||||
|
||||
// TODO drop type constraints parsing
|
||||
if (parseTypeParameterList(TYPE_PARAMETER_GT_RECOVERY_SET)) {
|
||||
parseTypeConstraints();
|
||||
}
|
||||
@@ -1210,9 +1207,8 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
||||
|
||||
consumeIf(SEMICOLON);
|
||||
|
||||
return TYPEDEF;
|
||||
return TYPEALIAS;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* variableDeclarationEntry
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright 2010-2016 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.kotlin.KtNodeTypes
|
||||
import org.jetbrains.kotlin.psi.stubs.KotlinTypeAliasStub
|
||||
import org.jetbrains.kotlin.psi.stubs.elements.KtStubElementTypes
|
||||
|
||||
class KtTypeAlias : KtTypeParameterListOwnerStub<KotlinTypeAliasStub>, KtNamedDeclaration {
|
||||
constructor(node: ASTNode) : super(node)
|
||||
constructor(stub: KotlinTypeAliasStub) : super(stub, KtStubElementTypes.TYPEALIAS)
|
||||
|
||||
override fun <R, D> accept(visitor: KtVisitor<R, D>, data: D): R =
|
||||
visitor.visitTypeAlias(this, data)
|
||||
|
||||
fun isTopLevel(): Boolean =
|
||||
stub?.isTopLevel() ?: parent is KtFile
|
||||
|
||||
@IfNotParsed
|
||||
fun getTypeReference(): KtTypeReference? =
|
||||
findChildByType(KtNodeTypes.TYPE_REFERENCE)
|
||||
}
|
||||
@@ -65,6 +65,10 @@ public class KtVisitor<R, D> extends PsiElementVisitor {
|
||||
return visitNamedDeclaration(multiDeclarationEntry, data);
|
||||
}
|
||||
|
||||
public R visitTypeAlias(@NotNull KtTypeAlias typeAlias, D data) {
|
||||
return visitNamedDeclaration(typeAlias, data);
|
||||
}
|
||||
|
||||
public R visitKtFile(@NotNull KtFile file, D data) {
|
||||
visitFile(file);
|
||||
return null;
|
||||
|
||||
@@ -53,6 +53,10 @@ public class KtVisitorVoid extends KtVisitor<Void, Void> {
|
||||
super.visitProperty(property, null);
|
||||
}
|
||||
|
||||
public void visitTypeAlias(@NotNull KtTypeAlias typeAlias) {
|
||||
super.visitTypeAlias(typeAlias, null);
|
||||
}
|
||||
|
||||
public void visitDestructuringDeclaration(@NotNull KtDestructuringDeclaration destructuringDeclaration) {
|
||||
super.visitDestructuringDeclaration(destructuringDeclaration, null);
|
||||
}
|
||||
@@ -478,6 +482,12 @@ public class KtVisitorVoid extends KtVisitor<Void, Void> {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Void visitTypeAlias(@NotNull KtTypeAlias typeAlias, Void data) {
|
||||
visitTypeAlias(typeAlias);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Void visitDestructuringDeclaration(@NotNull KtDestructuringDeclaration multiDeclaration, Void data) {
|
||||
visitDestructuringDeclaration(multiDeclaration);
|
||||
|
||||
@@ -36,6 +36,10 @@ interface KotlinStubWithFqName<T : PsiNamedElement> : NamedStub<T> {
|
||||
fun getFqName(): FqName?
|
||||
}
|
||||
|
||||
interface KotlinTypeAliasStub : KotlinStubWithFqName<KtTypeAlias> {
|
||||
fun isTopLevel(): Boolean
|
||||
}
|
||||
|
||||
interface KotlinClassOrObjectStub<T : KtClassOrObject> : KotlinStubWithFqName<T> {
|
||||
fun isLocal(): Boolean
|
||||
fun getSuperNames(): List<String>
|
||||
|
||||
+2
-1
@@ -28,6 +28,7 @@ public interface KtStubElementTypes {
|
||||
KtFunctionElementType FUNCTION = new KtFunctionElementType("FUN");
|
||||
KtPropertyElementType PROPERTY = new KtPropertyElementType("PROPERTY");
|
||||
KtPropertyAccessorElementType PROPERTY_ACCESSOR = new KtPropertyAccessorElementType("PROPERTY_ACCESSOR");
|
||||
KtTypeAliasElementType TYPEALIAS = new KtTypeAliasElementType("TYPEALIAS");
|
||||
|
||||
KtClassElementType ENUM_ENTRY = new KtClassElementType("ENUM_ENTRY");
|
||||
KtObjectElementType OBJECT_DECLARATION = new KtObjectElementType("OBJECT_DECLARATION");
|
||||
@@ -119,7 +120,7 @@ public interface KtStubElementTypes {
|
||||
KtScriptElementType SCRIPT = new KtScriptElementType("SCRIPT");
|
||||
|
||||
TokenSet DECLARATION_TYPES =
|
||||
TokenSet.create(CLASS, OBJECT_DECLARATION, FUNCTION, PROPERTY, CLASS_INITIALIZER, SECONDARY_CONSTRUCTOR, ENUM_ENTRY);
|
||||
TokenSet.create(CLASS, OBJECT_DECLARATION, FUNCTION, PROPERTY, TYPEALIAS, CLASS_INITIALIZER, SECONDARY_CONSTRUCTOR, ENUM_ENTRY);
|
||||
|
||||
TokenSet SUPER_TYPE_LIST_ENTRIES = TokenSet.create(DELEGATED_SUPER_TYPE_ENTRY, SUPER_TYPE_CALL_ENTRY, SUPER_TYPE_ENTRY);
|
||||
|
||||
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright 2010-2016 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.stubs.elements
|
||||
|
||||
import com.intellij.psi.stubs.StubElement
|
||||
import com.intellij.psi.stubs.StubInputStream
|
||||
import com.intellij.psi.stubs.StubOutputStream
|
||||
import com.intellij.util.io.StringRef
|
||||
import org.jetbrains.kotlin.psi.KtTypeAlias
|
||||
import org.jetbrains.kotlin.psi.stubs.KotlinTypeAliasStub
|
||||
import org.jetbrains.kotlin.psi.stubs.impl.KotlinTypeAliasStubImpl
|
||||
import org.jetbrains.kotlin.resolve.lazy.ResolveSessionUtils
|
||||
|
||||
class KtTypeAliasElementType(debugName: String) :
|
||||
KtStubElementType<KotlinTypeAliasStub, KtTypeAlias>(debugName, KtTypeAlias::class.java, KotlinTypeAliasStub::class.java) {
|
||||
|
||||
override fun createStub(psi: KtTypeAlias, parentStub: StubElement<*>?): KotlinTypeAliasStub {
|
||||
val name = StringRef.fromString(psi.name)
|
||||
val fqName = StringRef.fromString(ResolveSessionUtils.safeFqNameForLazyResolve(psi)?.asString())
|
||||
val isTopLevel = psi.isTopLevel()
|
||||
return KotlinTypeAliasStubImpl(KtStubElementTypes.TYPEALIAS, parentStub, name, fqName, isTopLevel)
|
||||
}
|
||||
|
||||
override fun serialize(stub: KotlinTypeAliasStub, dataStream: StubOutputStream) {
|
||||
dataStream.writeName(stub.getName())
|
||||
dataStream.writeName(stub.getFqName()?.asString())
|
||||
dataStream.writeBoolean(stub.isTopLevel())
|
||||
}
|
||||
|
||||
override fun deserialize(dataStream: StubInputStream, parentStub: StubElement<*>?): KotlinTypeAliasStub {
|
||||
val name = dataStream.readName()
|
||||
val fqName = dataStream.readName()
|
||||
val isTopLevel = dataStream.readBoolean()
|
||||
return KotlinTypeAliasStubImpl(KtStubElementTypes.TYPEALIAS, parentStub, name, fqName, isTopLevel)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright 2010-2016 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.stubs.impl
|
||||
|
||||
import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.stubs.StubElement
|
||||
import com.intellij.util.io.StringRef
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.psi.KtTypeAlias
|
||||
import org.jetbrains.kotlin.psi.stubs.KotlinTypeAliasStub
|
||||
import org.jetbrains.kotlin.psi.stubs.elements.KtTypeAliasElementType
|
||||
|
||||
class KotlinTypeAliasStubImpl(
|
||||
type: KtTypeAliasElementType,
|
||||
parent: StubElement<out PsiElement>?,
|
||||
private val name: StringRef?,
|
||||
private val qualifiedName: StringRef?,
|
||||
private val isTopLevel: Boolean
|
||||
) : KotlinStubBaseImpl<KtTypeAlias>(parent, type), KotlinTypeAliasStub {
|
||||
|
||||
override fun getName(): String? =
|
||||
StringRef.toString(name)
|
||||
|
||||
override fun getFqName(): FqName? =
|
||||
StringRef.toString(qualifiedName)?.let { FqName(it) }
|
||||
|
||||
override fun isTopLevel(): Boolean = isTopLevel
|
||||
}
|
||||
+1
@@ -3,6 +3,7 @@ fun foo() {
|
||||
fun foo()
|
||||
class foo
|
||||
|
||||
typealias x = t
|
||||
var r
|
||||
|
||||
@a var foo = 4
|
||||
|
||||
+12
@@ -32,6 +32,18 @@ JetFile: EOLsOnRollback.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('x')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('t')
|
||||
PsiWhiteSpace('\n ')
|
||||
PROPERTY
|
||||
PsiElement(var)('var')
|
||||
PsiWhiteSpace(' ')
|
||||
|
||||
+18
-20
@@ -1,24 +1,22 @@
|
||||
val v: (@[a] a) -> b
|
||||
val v: (a) -> b
|
||||
val v: () -> @[x] b
|
||||
val v: () -> Unit
|
||||
typealias f = (@[a] a) -> b
|
||||
typealias f = (a) -> b
|
||||
typealias f = () -> @[x] b
|
||||
typealias f = () -> Unit
|
||||
|
||||
val v: (a : @[a] a) -> b
|
||||
val v: (a : a) -> b
|
||||
val v: () -> b
|
||||
val v: () -> Unit
|
||||
typealias f = (a : @[a] a) -> b
|
||||
typealias f = (a : a) -> b
|
||||
typealias f = () -> b
|
||||
typealias f = () -> Unit
|
||||
|
||||
val v: (a : @[a] a, foo, x : bar) -> b
|
||||
val v: (foo, a : a) -> b
|
||||
val v: (foo, a : (a) -> b) -> b
|
||||
val v: (foo, a : (a) -> b) -> () -> Unit
|
||||
typealias f = (a : @[a] a, foo, x : bar) -> b
|
||||
typealias f = (foo, a : a) -> b
|
||||
typealias f = (foo, a : (a) -> b) -> b
|
||||
typealias f = (foo, a : (a) -> b) -> () -> Unit
|
||||
|
||||
//type f = (ref foo, ref a : (ref a) -> b) -> () -> Unit
|
||||
typealias f = T.() -> Unit
|
||||
typealias f = T.T.() -> Unit
|
||||
typealias f = T<A, B>.T<x>.() -> Unit
|
||||
|
||||
val v: T.() -> Unit
|
||||
val v: T.T.() -> Unit
|
||||
val v: T<A, B>.T<x>.() -> Unit
|
||||
|
||||
val v: @[a] T.() -> Unit
|
||||
val v: @[a] T.T.() -> Unit
|
||||
val v: @[a] T<A, B>.T<x>.() -> Unit
|
||||
typealias f = @[a] T.() -> Unit
|
||||
typealias f = @[a] T.T.() -> Unit
|
||||
typealias f = @[a] T<A, B>.T<x>.() -> Unit
|
||||
|
||||
+90
-74
@@ -3,12 +3,13 @@ JetFile: FunctionTypes.kt
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -39,12 +40,13 @@ JetFile: FunctionTypes.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace('\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -63,12 +65,13 @@ JetFile: FunctionTypes.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace('\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -93,12 +96,13 @@ JetFile: FunctionTypes.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace('\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -112,12 +116,13 @@ JetFile: FunctionTypes.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Unit')
|
||||
PsiWhiteSpace('\n\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -151,12 +156,13 @@ JetFile: FunctionTypes.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace('\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -179,12 +185,13 @@ JetFile: FunctionTypes.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace('\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -198,12 +205,13 @@ JetFile: FunctionTypes.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace('\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -217,12 +225,13 @@ JetFile: FunctionTypes.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Unit')
|
||||
PsiWhiteSpace('\n\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -274,12 +283,13 @@ JetFile: FunctionTypes.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace('\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -309,12 +319,13 @@ JetFile: FunctionTypes.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace('\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -357,12 +368,13 @@ JetFile: FunctionTypes.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace('\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
VALUE_PARAMETER_LIST
|
||||
@@ -413,14 +425,13 @@ JetFile: FunctionTypes.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Unit')
|
||||
PsiWhiteSpace('\n\n')
|
||||
PsiComment(EOL_COMMENT)('//type f = (ref foo, ref a : (ref a) -> b) -> () -> Unit')
|
||||
PsiWhiteSpace('\n\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
FUNCTION_TYPE_RECEIVER
|
||||
@@ -440,12 +451,13 @@ JetFile: FunctionTypes.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Unit')
|
||||
PsiWhiteSpace('\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
FUNCTION_TYPE_RECEIVER
|
||||
@@ -469,12 +481,13 @@ JetFile: FunctionTypes.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Unit')
|
||||
PsiWhiteSpace('\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
FUNCTION_TYPE_RECEIVER
|
||||
@@ -521,11 +534,12 @@ JetFile: FunctionTypes.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Unit')
|
||||
PsiWhiteSpace('\n\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
@@ -557,11 +571,12 @@ JetFile: FunctionTypes.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Unit')
|
||||
PsiWhiteSpace('\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
@@ -597,11 +612,12 @@ JetFile: FunctionTypes.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Unit')
|
||||
PsiWhiteSpace('\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
val v: (a, ) -> b
|
||||
typealias f = (a, ) -> b
|
||||
|
||||
+5
-4
@@ -3,12 +3,13 @@ JetFile: FunctionTypes_ERR.kt
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
VALUE_PARAMETER_LIST
|
||||
|
||||
+1
@@ -6,4 +6,5 @@ fun foo() {
|
||||
|
||||
out val foo = 5
|
||||
@a var foo = 4
|
||||
typealias f = T.() -> Unit
|
||||
}
|
||||
|
||||
+26
@@ -91,5 +91,31 @@ JetFile: LocalDeclarations.kt
|
||||
PsiWhiteSpace(' ')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('4')
|
||||
PsiWhiteSpace('\n ')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
FUNCTION_TYPE
|
||||
FUNCTION_TYPE_RECEIVER
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(DOT)('.')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Unit')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
+6
@@ -12,6 +12,8 @@ class foo {
|
||||
val x
|
||||
|
||||
var f
|
||||
|
||||
typealias foo = bar
|
||||
}
|
||||
|
||||
class Bar {
|
||||
@@ -42,6 +44,8 @@ class foo {
|
||||
val x
|
||||
|
||||
var f
|
||||
|
||||
typealias foo = bar
|
||||
}
|
||||
|
||||
fun foo()
|
||||
@@ -50,6 +54,8 @@ class foo {
|
||||
|
||||
var f
|
||||
|
||||
typealias foo = bar
|
||||
|
||||
companion object {
|
||||
|
||||
}
|
||||
|
||||
+36
@@ -55,6 +55,18 @@ JetFile: SimpleClassMembers.kt
|
||||
PsiElement(var)('var')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
@@ -222,6 +234,18 @@ JetFile: SimpleClassMembers.kt
|
||||
PsiElement(var)('var')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
@@ -243,6 +267,18 @@ JetFile: SimpleClassMembers.kt
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
OBJECT_DECLARATION
|
||||
MODIFIER_LIST
|
||||
PsiElement(companion)('companion')
|
||||
|
||||
@@ -11,4 +11,6 @@ class foo {
|
||||
val x
|
||||
|
||||
var f
|
||||
|
||||
typealias foo = ;
|
||||
}
|
||||
@@ -53,5 +53,17 @@ JetFile: SimpleClassMembers_ERR.kt
|
||||
PsiElement(var)('var')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
PsiErrorElement:Type expected
|
||||
<empty list>
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
package foo.bar.goo
|
||||
|
||||
typealias foo = bar
|
||||
typealias foo<T> = bar
|
||||
typealias foo<T : foo> = bar
|
||||
typealias foo<A, B> = bar
|
||||
typealias foo<A, B : A> = bar
|
||||
|
||||
typealias foo = bar ;
|
||||
typealias foo<T> = bar ;
|
||||
|
||||
typealias foo<T : foo> = bar ;
|
||||
typealias foo<A, B> = bar ;
|
||||
typealias foo<A, B : A> = bar ;
|
||||
Vendored
+230
@@ -0,0 +1,230 @@
|
||||
JetFile: TypeAlias.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
PsiElement(package)('package')
|
||||
PsiWhiteSpace(' ')
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('goo')
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n\n')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(GT)('>')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(GT)('>')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('B')
|
||||
PsiElement(GT)('>')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('B')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiElement(GT)('>')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace('\n\n')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(GT)('>')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n\n')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiElement(GT)('>')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('B')
|
||||
PsiElement(GT)('>')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('B')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiElement(GT)('>')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(SEMICOLON)(';')
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
typealias
|
||||
typealias foo
|
||||
typealias foo =
|
||||
typealias ;
|
||||
typealias foo ;
|
||||
typealias foo = ;
|
||||
typealias = foo
|
||||
typealias =
|
||||
typealias = foo ;
|
||||
typealias = ;
|
||||
|
||||
typealias foo<> = bar
|
||||
typealias foo<T, > = bar
|
||||
typealias foo<A : , B> = bar
|
||||
|
||||
class
|
||||
typealias foo = bar
|
||||
+196
@@ -0,0 +1,196 @@
|
||||
JetFile: TypeAlias_ERR.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiErrorElement:Type name expected
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n')
|
||||
TYPE_REFERENCE
|
||||
PsiErrorElement:Type expected
|
||||
<empty list>
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiErrorElement:Expecting '='
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n')
|
||||
TYPE_REFERENCE
|
||||
PsiErrorElement:Type expected
|
||||
<empty list>
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPE_REFERENCE
|
||||
PsiErrorElement:Type expected
|
||||
<empty list>
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiErrorElement:Type name expected
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
PsiErrorElement:Type expected
|
||||
<empty list>
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiErrorElement:Expecting '='
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
PsiErrorElement:Type expected
|
||||
<empty list>
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
PsiErrorElement:Type expected
|
||||
<empty list>
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiErrorElement:Type name expected
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiErrorElement:Type name expected
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPE_REFERENCE
|
||||
PsiErrorElement:Type expected
|
||||
<empty list>
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiErrorElement:Type name expected
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiErrorElement:Type name expected
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
PsiErrorElement:Type expected
|
||||
<empty list>
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n\n')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
PsiErrorElement:Type parameter declaration expected
|
||||
<empty list>
|
||||
PsiElement(GT)('>')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('T')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiErrorElement:Type parameter declaration expected
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(GT)('>')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
TYPE_PARAMETER_LIST
|
||||
PsiElement(LT)('<')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(COLON)(':')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
PsiErrorElement:Type expected
|
||||
<empty list>
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_PARAMETER
|
||||
PsiElement(IDENTIFIER)('B')
|
||||
PsiElement(GT)('>')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
PsiWhiteSpace('\n\n')
|
||||
CLASS
|
||||
PsiElement(class)('class')
|
||||
PsiErrorElement:Name expected
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('foo')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('bar')
|
||||
+9
-9
@@ -1,10 +1,10 @@
|
||||
val v: (((S).() -> S).() -> S)
|
||||
val v: ((T.() -> S).() -> S)
|
||||
val v: ((T.T.() -> S).() -> S)
|
||||
val v: ((T<A, B>.T<x>.() -> S).() -> S)
|
||||
val v: (((S).() -> S).() -> S)
|
||||
typealias f = (((S).() -> S).() -> S)
|
||||
typealias f = ((T.() -> S).() -> S)
|
||||
typealias f = ((T.T.() -> S).() -> S)
|
||||
typealias f = ((T<A, B>.T<x>.() -> S).() -> S)
|
||||
typealias f = (((S).() -> S).() -> S)
|
||||
|
||||
val v: @[a] (@[a] ((S).() -> S).() -> S)
|
||||
val v: @[a] (@[a] (T.() -> S).() -> S)
|
||||
val v: @[a] (@[a] (T<A, B>.() -> S).() -> S)
|
||||
val v: @[a] (@[a] ((S).() -> S).() -> S)
|
||||
typealias f = @[a] (@[a] ((S).() -> S).() -> S)
|
||||
typealias f = @[a] (@[a] (T.() -> S).() -> S)
|
||||
typealias f = @[a] (@[a] (T<A, B>.() -> S).() -> S)
|
||||
typealias f = @[a] (@[a] ((S).() -> S).() -> S)
|
||||
+45
-36
@@ -3,11 +3,12 @@ JetFile: FunctionTypesWithFunctionReceivers.kt
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
PsiElement(LPAR)('(')
|
||||
@@ -48,11 +49,12 @@ JetFile: FunctionTypesWithFunctionReceivers.kt
|
||||
PsiElement(IDENTIFIER)('S')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
PsiElement(LPAR)('(')
|
||||
@@ -91,11 +93,12 @@ JetFile: FunctionTypesWithFunctionReceivers.kt
|
||||
PsiElement(IDENTIFIER)('S')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
PsiElement(LPAR)('(')
|
||||
@@ -138,11 +141,12 @@ JetFile: FunctionTypesWithFunctionReceivers.kt
|
||||
PsiElement(IDENTIFIER)('S')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
PsiElement(LPAR)('(')
|
||||
@@ -208,11 +212,12 @@ JetFile: FunctionTypesWithFunctionReceivers.kt
|
||||
PsiElement(IDENTIFIER)('S')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
PsiElement(LPAR)('(')
|
||||
@@ -253,12 +258,13 @@ JetFile: FunctionTypesWithFunctionReceivers.kt
|
||||
PsiElement(IDENTIFIER)('S')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
PsiElement(AT)('@')
|
||||
@@ -320,11 +326,12 @@ JetFile: FunctionTypesWithFunctionReceivers.kt
|
||||
PsiElement(IDENTIFIER)('S')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
@@ -385,11 +392,12 @@ JetFile: FunctionTypesWithFunctionReceivers.kt
|
||||
PsiElement(IDENTIFIER)('S')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
@@ -465,11 +473,12 @@ JetFile: FunctionTypesWithFunctionReceivers.kt
|
||||
PsiElement(IDENTIFIER)('S')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n')
|
||||
PROPERTY
|
||||
PsiElement(val)('val')
|
||||
TYPEALIAS
|
||||
PsiElement(typealias)('typealias')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('v')
|
||||
PsiElement(COLON)(':')
|
||||
PsiElement(IDENTIFIER)('f')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQ)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
ANNOTATION
|
||||
|
||||
@@ -733,6 +733,18 @@ public class ParsingTestGenerated extends AbstractParsingTest {
|
||||
doParsingTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("TypeAlias.kt")
|
||||
public void testTypeAlias() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/TypeAlias.kt");
|
||||
doParsingTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("TypeAlias_ERR.kt")
|
||||
public void testTypeAlias_ERR() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/TypeAlias_ERR.kt");
|
||||
doParsingTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("TypeConstraints.kt")
|
||||
public void testTypeConstraints() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/TypeConstraints.kt");
|
||||
|
||||
+3
@@ -85,6 +85,9 @@ class StubBasedPackageMemberDeclarationProvider(
|
||||
return PackageIndexUtil.findFilesWithExactPackage(fqName, searchScope, project)
|
||||
}
|
||||
|
||||
override fun getTypeAliasDeclarations(name: Name): Collection<KtTypeAlias> =
|
||||
emptyList() // TODO stub index for type aliases
|
||||
|
||||
private fun childName(name: Name): String {
|
||||
return fqName.child(ResolveSessionUtils.safeNameForLazyResolve(name)).asString()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user