Skip to content

Commit

Permalink
Refactored StringValue.equals
Browse files Browse the repository at this point in the history
  • Loading branch information
davidepalladino-apuliasoft committed Dec 9, 2024
1 parent 0deb069 commit 784d176
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,9 @@ data class StringValue(var value: String, var varying: Boolean = false) : Abstra
}

override fun equals(other: Any?): Boolean {
return if (other is StringValue) {
this.value == other.value
} else {
false
return when (other) {
is StringValue -> this.value == other.value
else -> false
}
}

Expand Down

0 comments on commit 784d176

Please sign in to comment.