Skip to content

Commit 6c2c5c5

Browse files
committed
Nowarn LazyVals
1 parent a5d9e25 commit 6c2c5c5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/src/scala/runtime/LazyVals.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ object LazyVals {
9696
println(s"CAS($t, $offset, $e, $v, $ord)")
9797
val mask = ~(LAZY_VAL_MASK << ord * BITS_PER_LAZY_VAL)
9898
val n = (e & mask) | (v.toLong << (ord * BITS_PER_LAZY_VAL))
99-
unsafe.compareAndSwapLong(t, offset, e, n)
99+
unsafe.compareAndSwapLong(t, offset, e, n): @nowarn("cat=deprecation")
100100
}
101101

102102
def objCAS(t: Object, offset: Long, exp: Object, n: Object): Boolean = {
103103
if (debug)
104104
println(s"objCAS($t, $exp, $n)")
105-
unsafe.compareAndSwapObject(t, offset, exp, n)
105+
unsafe.compareAndSwapObject(t, offset, exp, n): @nowarn("cat=deprecation")
106106
}
107107

108108
def setFlag(t: Object, offset: Long, v: Int, ord: Int): Unit = {
@@ -147,7 +147,7 @@ object LazyVals {
147147
def get(t: Object, off: Long): Long = {
148148
if (debug)
149149
println(s"get($t, $off)")
150-
unsafe.getLongVolatile(t, off)
150+
unsafe.getLongVolatile(t, off): @nowarn("cat=deprecation")
151151
}
152152

153153
// kept for backward compatibility

0 commit comments

Comments
 (0)