Skip to content

Commit 410ef3d

Browse files
ctruchiCLOVIS-AI
authored andcommitted
tp5 step 1 solution
1 parent 5e1419a commit 410ef3d

File tree

1 file changed

+3
-3
lines changed
  • tp5/src/main/kotlin/fmt/kotlin/fundamentals

1 file changed

+3
-3
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package fmt.kotlin.fundamentals
22

3-
class Bottle(
3+
data class Bottle(
44
val name: String,
55
val year: Int
66
) {
77

8-
fun isEqualTo(bottle: Bottle) = false
8+
fun isEqualTo(bottle: Bottle) = this == bottle
99

10-
fun isSameInstance(bottle: Bottle) = false
10+
fun isSameInstance(bottle: Bottle) = this === bottle
1111
}

0 commit comments

Comments
 (0)