kotlin icon indicating copy to clipboard operation
kotlin copied to clipboard

Make K2 incompatible ObjCName error consistent with K1

Open MarkCMann opened this issue 1 year ago • 2 comments

This changes the K2 error message from:

Repro.kt:16:1: error: member 'class DerivedFoo : AbstractFoo, IFoo' inherits inconsistent '@ObjCName' from '[class AbstractFoo : Any, interface IFoo : Any]'.
class DerivedFoo : AbstractFoo(), IFoo {}
^

To:

Repro.kt:16:1: error: member '@ObjCName(...) fun foo(): Unit' inherits inconsistent '@ObjCName' from '[class AbstractFoo : Any, interface IFoo : Any]'.
class DerivedFoo : AbstractFoo(), IFoo {}
^

Which is more in line with the error from 1.9:

/Users/markmann/incompatible-objc-name/Repro.kt:16:1: error: member "foo" inherits inconsistent @ObjCName from AbstractFoo, IFoo
class DerivedFoo : AbstractFoo(), IFoo {}
^

^KT-65572

MarkCMann avatar Feb 05 '24 23:02 MarkCMann

@mglukhikh could you take a look?

BlondeHex avatar Feb 14 '24 17:02 BlondeHex

Fixed - https://github.com/jetbrains/kotlin/commit/ec12637d7a89146ddd9b9baec07f9698b5054d39

BlondeHex avatar Feb 16 '24 11:02 BlondeHex

Seems merged manually, closing.

SvyatoslavScherbina avatar Jul 26 '24 17:07 SvyatoslavScherbina