Improve support of custom equals in inline classes
- Ensure that typed equals parameter's type is a star projection of corresponding inline class - Make possible to declare typed equals that returns 'Nothing' - Forbid type parameters in typed equals operator declaration ^KT-54909 fixed ^KT-54910 fixed
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class A(val x: Int) {
|
||||
fun equals(other: A) = x % 5 == other.x % 5
|
||||
operator fun equals(other: A) = x % 5 == other.x % 5
|
||||
}
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
|
||||
Reference in New Issue
Block a user