KtFile: J2K and cleanup
This commit is contained in:
+1
-1
@@ -334,7 +334,7 @@ abstract class KtLightClassForSourceDeclaration(protected val classOrObject: KtC
|
||||
|
||||
|
||||
fun create(classOrObject: KtClassOrObject): KtLightClassForSourceDeclaration? {
|
||||
if (classOrObject.containingKtFile.isScript || classOrObject.hasModifier(KtTokens.HEADER_KEYWORD)) {
|
||||
if (classOrObject.containingKtFile.isScript() || classOrObject.hasModifier(KtTokens.HEADER_KEYWORD)) {
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ fun getJvmSignatureDiagnostics(element: PsiElement, otherDiagnostics: Diagnostic
|
||||
|
||||
fun doGetDiagnostics(): Diagnostics? {
|
||||
//TODO: enable this diagnostic when light classes for scripts are ready
|
||||
if ((element.containingFile as? KtFile)?.isScript ?: false) return null
|
||||
if ((element.containingFile as? KtFile)?.isScript() ?: false) return null
|
||||
|
||||
var parent = element.parent
|
||||
if (element is KtPropertyAccessor) {
|
||||
|
||||
Reference in New Issue
Block a user