generated from JavierSegoviaCordoba/kotlin-template-javiersc
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
| datasource | package | from | to | | -------------- | ------- | ---- | --- | | gradle-version | gradle | 8.4 | 8.5 |
- Loading branch information
1 parent
5982f97
commit 9363de5
Showing
7 changed files
with
86 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,5 @@ | |
### Fixed | ||
|
||
### Updated | ||
|
||
- `gradle -> 8.5` |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
kopy-runtime/main/kotlin/com/javiersc/kotlin/kopy/runtime/delete/Delete.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.javiersc.kotlin.kopy.playground | ||
|
||
import com.javiersc.kotlin.kopy.Kopy | ||
import com.javiersc.kotlin.kopy.runtime.Kopyable | ||
|
||
internal fun box(): String { | ||
val house0 = House(street = "Street", squareMeters = 20) | ||
val house1 = house0 { squareMeters.update { 40 } } | ||
val house2 = | ||
house0.run { | ||
var tmp1 = this | ||
tmp1 = tmp1.copy(squareMeters = tmp1.squareMeters.let { 40 }) | ||
tmp1 | ||
} | ||
return if (house1 == house2) "OK" else "ERROR" | ||
} | ||
|
||
@Kopy internal data class House(val street: String, val squareMeters: Int) : Kopyable<House> |
26 changes: 26 additions & 0 deletions
26
kopy-runtime/main/kotlin/com/javiersc/kotlin/kopy/runtime/delete/Delete2.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.javiersc.kotlin.kopy.runtime.delete | ||
|
||
import com.javiersc.kotlin.kopy.Kopy | ||
import com.javiersc.kotlin.kopy.runtime.Kopyable | ||
|
||
public fun box(): String { | ||
val house0 = House(street = "Street", squareMeters = 20) | ||
val house1 = house0.copy() | ||
val house2 = house1 { squareMeters.update { 40 } } | ||
val house3 = house1.copy(squareMeters = house1.squareMeters.let { 40 }) | ||
return if (house2 == house3) "OK" else "ERROR" | ||
} | ||
|
||
@Kopy internal data class House(val street: String, val squareMeters: Int) : Kopyable<House> | ||
|
||
internal fun delete() { | ||
val house0 = House(street = "Street", squareMeters = 20) | ||
val house1 = house0 { squareMeters.update { 2 } } | ||
} | ||
|
||
// internal fun House.hello() { | ||
// squareMeters.update { 2 } | ||
// val house = this { | ||
// squareMeters.update { 2 } | ||
// } | ||
// } |