Skip to content

Commit 67f632c

Browse files
authored
Merge pull request github#107 from github/kotlin-reduce-extraction-noise
Remove external property related log messages
2 parents 26c3b70 + ef1413d commit 67f632c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

java/kotlin-extractor/src/main/kotlin/KotlinExtractorExtension.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,9 @@ open class KotlinFileExtractor(
13071307
val getterId = extractFunction(getter, parentId) as Label<out DbMethod>
13081308
tw.writeKtPropertyGetters(id, getterId)
13091309
} else {
1310-
logger.warnElement(Severity.ErrorSevere, "IrProperty without a getter", p)
1310+
if (p.modality != Modality.FINAL || !isExternalDeclaration(p)) {
1311+
logger.warnElement(Severity.ErrorSevere, "IrProperty without a getter", p)
1312+
}
13111313
}
13121314

13131315
if(setter != null) {
@@ -1318,7 +1320,7 @@ open class KotlinFileExtractor(
13181320
val setterId = extractFunction(setter, parentId) as Label<out DbMethod>
13191321
tw.writeKtPropertySetters(id, setterId)
13201322
} else {
1321-
if(p.isVar) {
1323+
if (p.isVar && !isExternalDeclaration(p)) {
13221324
logger.warnElement(Severity.ErrorSevere, "isVar property without a setter", p)
13231325
}
13241326
}

0 commit comments

Comments
 (0)