Fix stub mismatch for top level declaration with JvmPackageName (KT-21831)

ClassId stores jvm name and it differs from kotlin name in that case.

 #KT-21831 Fixed
This commit is contained in:
Nikolay Krasko
2018-03-13 15:36:47 +03:00
parent c1f43558b9
commit bc7ccbc39b
6 changed files with 54 additions and 5 deletions
@@ -0,0 +1,9 @@
@file:Suppress("UNCHECKED_CAST", "NOTHING_TO_INLINE", "INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
@file:JvmName("OtherKt")
@file:kotlin.jvm.JvmPackageName("some.other.jvm")
package some.other
@SinceKotlin("1.2")
fun foo() {}
// JVM_FILE_NAME: OtherKt
@@ -0,0 +1,21 @@
PsiJetFileStubImpl[package=some.other]
PACKAGE_DIRECTIVE
DOT_QUALIFIED_EXPRESSION
REFERENCE_EXPRESSION[referencedName=some]
REFERENCE_EXPRESSION[referencedName=other]
IMPORT_LIST
FUN[fqName=some.other.foo, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isTopLevel=true, name=foo]
MODIFIER_LIST[public]
ANNOTATION_ENTRY[hasValueArguments=false, shortName=SinceKotlin]
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
USER_TYPE
REFERENCE_EXPRESSION[referencedName=kotlin]
REFERENCE_EXPRESSION[referencedName=SinceKotlin]
VALUE_PARAMETER_LIST
TYPE_REFERENCE
USER_TYPE
USER_TYPE
REFERENCE_EXPRESSION[referencedName=kotlin]
REFERENCE_EXPRESSION[referencedName=Unit]