Skip to content

Commit 3b53a5a

Browse files
committed
NullableReference.kt: relax variance of the type parameter from invariant to covariant
1 parent c737e21 commit 3b53a5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

firebase-dataconnect/src/main/kotlin/com/google/firebase/dataconnect/util/NullableReference.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
package com.google.firebase.dataconnect.util
1717

18-
internal class NullableReference<T>(val ref: T? = null) {
18+
internal class NullableReference<out T>(val ref: T? = null) {
1919
override fun equals(other: Any?) = (other is NullableReference<*>) && other.ref == ref
2020
override fun hashCode() = ref?.hashCode() ?: 0
2121
override fun toString() = ref?.toString() ?: "null"

0 commit comments

Comments
 (0)