Register EXPRESSION_CODE_FRAGMENT, BLOCK_CODE_FRAGMENT in KtStubElementTypes

Stubbed type has to be register earlier (see IStubFileElementType#checkNotInstantiatedTooLate)

Relates to ^KT-28732
This commit is contained in:
Vladimir Dolzhenko
2020-10-05 11:09:27 +02:00
parent 3cd552cb43
commit 29b23e79f3
2 changed files with 4 additions and 2 deletions
@@ -161,6 +161,6 @@ public interface KtNodeTypes {
IElementType SCRIPT = KtStubElementTypes.SCRIPT;
IFileElementType TYPE_CODE_FRAGMENT = KtStubElementTypes.TYPE_CODE_FRAGMENT;
IFileElementType EXPRESSION_CODE_FRAGMENT = new KtExpressionCodeFragmentType();
IFileElementType BLOCK_CODE_FRAGMENT = new KtBlockCodeFragmentType();
IFileElementType EXPRESSION_CODE_FRAGMENT = KtStubElementTypes.EXPRESSION_CODE_FRAGMENT;
IFileElementType BLOCK_CODE_FRAGMENT = KtStubElementTypes.BLOCK_CODE_FRAGMENT;
}
@@ -90,6 +90,8 @@ public interface KtStubElementTypes {
new KtPlaceHolderStubElementType<>("FUNCTION_TYPE", KtFunctionType.class);
KtTypeCodeFragmentType TYPE_CODE_FRAGMENT = new KtTypeCodeFragmentType();
KtExpressionCodeFragmentType EXPRESSION_CODE_FRAGMENT = new KtExpressionCodeFragmentType();
KtBlockCodeFragmentType BLOCK_CODE_FRAGMENT = new KtBlockCodeFragmentType();
KtTypeProjectionElementType TYPE_PROJECTION = new KtTypeProjectionElementType("TYPE_PROJECTION");