Introduce 'mayHaveContract'-flag in stubs
This is needed for further commit, which supports contracts-based smartcasts in partial body resolve mode. NB: Stubs can be built from 3 sources: - source code (contract presence can be checked by PSI) - binary data (contract presence can be checked by Kotlin Metadata) - decompiled sources The last case is a bit of a headache, because usually bodies are omitted in decompiled sources. To workaround it, we have to inject stubbed contract-call in the body.
This commit is contained in:
@@ -20,7 +20,7 @@ PsiJetFileStubImpl[package=test.class_object]
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION[referencedName=kotlin]
|
||||
REFERENCE_EXPRESSION[referencedName=Int]
|
||||
FUN[fqName=test.class_object.ClassObject.Companion.z, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isTopLevel=false, name=z]
|
||||
FUN[fqName=test.class_object.ClassObject.Companion.z, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isTopLevel=false, mayHaveContract=false, name=z]
|
||||
MODIFIER_LIST[public final]
|
||||
VALUE_PARAMETER_LIST
|
||||
TYPE_REFERENCE
|
||||
@@ -47,7 +47,7 @@ PsiJetFileStubImpl[package=test.class_object]
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION[referencedName=kotlin]
|
||||
REFERENCE_EXPRESSION[referencedName=Int]
|
||||
FUN[fqName=test.class_object.ClassObject.Companion.A.B.f, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isTopLevel=false, name=f]
|
||||
FUN[fqName=test.class_object.ClassObject.Companion.A.B.f, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isTopLevel=false, mayHaveContract=false, name=f]
|
||||
MODIFIER_LIST[public final]
|
||||
VALUE_PARAMETER_LIST
|
||||
TYPE_REFERENCE
|
||||
@@ -62,7 +62,7 @@ PsiJetFileStubImpl[package=test.class_object]
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION[referencedName=kotlin]
|
||||
REFERENCE_EXPRESSION[referencedName=Int]
|
||||
FUN[fqName=test.class_object.ClassObject.f, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isTopLevel=false, name=f]
|
||||
FUN[fqName=test.class_object.ClassObject.f, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isTopLevel=false, mayHaveContract=false, name=f]
|
||||
MODIFIER_LIST[public final]
|
||||
VALUE_PARAMETER_LIST
|
||||
TYPE_REFERENCE
|
||||
@@ -104,7 +104,7 @@ PsiJetFileStubImpl[package=test.class_object]
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION[referencedName=kotlin]
|
||||
REFERENCE_EXPRESSION[referencedName=Int]
|
||||
FUN[fqName=test.class_object.ClassObject.B.Companion.C.Companion.D.Companion.f, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isTopLevel=false, name=f]
|
||||
FUN[fqName=test.class_object.ClassObject.B.Companion.C.Companion.D.Companion.f, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isTopLevel=false, mayHaveContract=false, name=f]
|
||||
MODIFIER_LIST[public final]
|
||||
VALUE_PARAMETER_LIST
|
||||
TYPE_REFERENCE
|
||||
|
||||
Reference in New Issue
Block a user