Provide spec for multiple platform-specific non-actuals with identical DRIs #3503
Labels
enhancement
An issue for a feature or an overall improvement
feedback: Google
An issue/PR submitted by colleagues at Google, most likely related to the Android API reference docs
kdoc-spec
An issue that requires clarification from the KDoc spec's perspective
An example of this is
KAnnotatedElement
, which has definitions in JVM and native but not common, with the same DRI/fully-qualified-name.In this case, it seems very reasonable to have a unified page, but what if these two members had meaningfully different definitions, e.g. Field.jvm.kt: interface Field : PSIElement and Field.native.kt: class Field : GrassyTerrain or something.
(Or just a significant difference in supertypes like UASTElement and SomeNativeSyntaxTreeElement that lead to completely disjoint API surfaces.)
What I would propose is banning this at a compiler level and e.g. making
@Suppress("NO_ACTUAL_FOR_EXPECT") expect interface KAnnotatedElement
, or diverging the names by platform.The text was updated successfully, but these errors were encountered: