Files
kotlin-fork/compiler/testData/diagnostics/tests/IncDecOperatorsInExpectClass.kt
T
Pavel Kirpichenkov 0362d4ac9f [MPP] workaround inc/dec operator checks in expect classes
Implicit receiver type inside expect class is inconsistent with the
type resolved from an explicit reference inside that class. The former
one is a default class type, i.e. expect; the latter one resolves to
an actual type when either expect and actual are in the same module, or
when the sources are compiled for a particular platform.

The workaround is to manually actualize implicit receiver type for one
particular check affected by the broken subtyping.

KT-49714
2022-02-04 16:57:22 +03:00

12 lines
207 B
Kotlin
Vendored

// FIR_IDENTICAL
// !LANGUAGE: +MultiPlatformProjects
// SKIP_TXT
// Issue: KT-49714
expect class Counter {
operator fun inc(): Counter
operator fun dec(): Counter
}
actual typealias Counter = Int