Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b381556

Browse files
committed
Kotlin: Fix up things that got pulled out into KotlinUsesExtractor
1 parent a5a42b4 commit b381556

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ open class KotlinUsesExtractor(
352352

353353
fun extractClassInstance(c: IrClass, typeArgs: List<IrTypeArgument>): Label<out DbClassorinterface> {
354354
if (typeArgs.isEmpty()) {
355-
// TODO logger.warnElement(Severity.ErrorSevere, "Instance without type arguments: " + c.name.asString(), c)
355+
logger.warn(Severity.ErrorSevere, "Instance without type arguments: " + c.name.asString())
356356
}
357357

358358
val id = addClassLabel(c, typeArgs)
@@ -378,7 +378,7 @@ open class KotlinUsesExtractor(
378378
}
379379

380380
for ((idx, arg) in typeArgs.withIndex()) {
381-
val argId = getTypeArgumentLabel(arg, c)
381+
val argId = getTypeArgumentLabel(arg)
382382
tw.writeTypeArgs(argId, idx, id)
383383
}
384384
tw.writeIsParameterized(id)
@@ -572,7 +572,7 @@ class X {
572572
is IrClass -> return useClassSource(dp)
573573
is IrFunction -> return useFunction(dp)
574574
else -> {
575-
// TODO logger.warnElement(Severity.ErrorSevere, "Unrecognised IrDeclarationParent: " + dp.javaClass, dp)
575+
logger.warn(Severity.ErrorSevere, "Unrecognised IrDeclarationParent: " + dp.javaClass)
576576
return fakeLabel()
577577
}
578578
}
@@ -597,8 +597,7 @@ class X {
597597
}
598598

599599
fun getTypeArgumentLabel(
600-
arg: IrTypeArgument,
601-
reportOn: IrElement
600+
arg: IrTypeArgument
602601
): Label<out DbReftype> {
603602
when (arg) {
604603
is IrStarProjection -> {
@@ -613,7 +612,7 @@ class X {
613612
return useTypeOld(arg.type, false) as Label<out DbReftype>
614613
}
615614
else -> {
616-
// TODO logger.warnElement(Severity.ErrorSevere, "Unexpected type argument.", reportOn)
615+
logger.warn(Severity.ErrorSevere, "Unexpected type argument.")
617616
return fakeLabel()
618617
}
619618
}
@@ -633,7 +632,7 @@ class X {
633632
}
634633

635634
for (arg in typeArgs) {
636-
val argId = getTypeArgumentLabel(arg, c)
635+
val argId = getTypeArgumentLabel(arg)
637636
label += ";{$argId}"
638637
}
639638

@@ -668,7 +667,7 @@ class X {
668667
return extractTypeParameter(param)
669668
}
670669

671-
// TODO logger.warnElement(Severity.ErrorSevere, "Missing type parameter label", param)
670+
logger.warn(Severity.ErrorSevere, "Missing type parameter label")
672671
return tw.getLabelFor(l)
673672
}
674673

@@ -681,6 +680,7 @@ class X {
681680
is IrClass -> useClassSource(parent)
682681
else -> {
683682
// TODO logger.warnElement(Severity.ErrorSevere, "Unexpected type parameter parent", tp)
683+
logger.warn(Severity.ErrorSevere, "Unexpected type parameter parent")
684684
fakeLabel()
685685
}
686686
}

0 commit comments

Comments
 (0)