Fix 'equals' for NotNullBasicValue
NotNullBasicValues were merged incorrectly sometimes, which caused problems with INSTANCEOF checks. #KT-18779 Fixed
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ import org.jetbrains.org.objectweb.asm.Type
|
||||
import org.jetbrains.org.objectweb.asm.tree.analysis.BasicValue
|
||||
|
||||
class NotNullBasicValue(type: Type?) : StrictBasicValue(type) {
|
||||
override fun equals(other: Any?): Boolean = other is NotNullBasicValue
|
||||
override fun equals(other: Any?): Boolean = other is NotNullBasicValue && other.type == type
|
||||
// We do not differ not-nullable values, so we should always return the same hashCode
|
||||
// Actually it doesn't really matter because analyzer is not supposed to store values in hashtables
|
||||
override fun hashCode() = 0
|
||||
|
||||
Reference in New Issue
Block a user