mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-08-03 21:21:33 +00:00
ast: fix codegen of equals to not produce warnings
This commit is contained in:
@ -12,10 +12,8 @@ class Break : Expression() {
|
||||
override fun <T> visit(visitor: NodeVisitor<T>): T =
|
||||
visitor.visitBreak(this)
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (other !is Break) return false
|
||||
return true
|
||||
}
|
||||
override fun equals(other: Any?): Boolean =
|
||||
other is Break
|
||||
|
||||
override fun hashCode(): Int =
|
||||
31 * type.hashCode()
|
||||
|
@ -12,10 +12,8 @@ class Continue : Expression() {
|
||||
override fun <T> visit(visitor: NodeVisitor<T>): T =
|
||||
visitor.visitContinue(this)
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (other !is Continue) return false
|
||||
return true
|
||||
}
|
||||
override fun equals(other: Any?): Boolean =
|
||||
other is Continue
|
||||
|
||||
override fun hashCode(): Int =
|
||||
31 * type.hashCode()
|
||||
|
@ -12,10 +12,8 @@ class NoneLiteral : Expression() {
|
||||
override fun <T> visit(visitor: NodeVisitor<T>): T =
|
||||
visitor.visitNoneLiteral(this)
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (other !is NoneLiteral) return false
|
||||
return true
|
||||
}
|
||||
override fun equals(other: Any?): Boolean =
|
||||
other is NoneLiteral
|
||||
|
||||
override fun hashCode(): Int =
|
||||
31 * type.hashCode()
|
||||
|
Reference in New Issue
Block a user