You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
given (x: Array[Char]) extended with {
inline def swap(i: Int, j: Int) : Unit =
val v = x(i)
x(i) = x(j)
x(j) = v
}
val a = Array('A','B')
a.swap(0,1)
println(a.toList)
// Run Result
List(B, B)
// Expectation
List(B, A)
If "inline" is removed, the expectation is fulfilled
The text was updated successfully, but these errors were encountered:
Before the fix to scala#8058, a reference `x` with constant type `0` was
deemed to have a stable member symbol since its symbol did not exist.
That's what gave the reference the `PurePath` status. Now that
`isStableMember` is fixed, this needs to be asserted
explicitly.
// Run Result
List(B, B)
// Expectation
List(B, A)
If "inline" is removed, the expectation is fulfilled
The text was updated successfully, but these errors were encountered: