[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
This commit is contained in:
committed by
teamcity
parent
90abbb4a9f
commit
0362d4ac9f
@@ -1,10 +1,11 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
// SKIP_TXT
|
||||
// Issue: KT-49714
|
||||
|
||||
expect class Counter {
|
||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun inc(): Counter
|
||||
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun dec(): Counter
|
||||
operator fun inc(): Counter
|
||||
operator fun dec(): Counter
|
||||
}
|
||||
|
||||
actual typealias Counter = Int
|
||||
|
||||
Reference in New Issue
Block a user