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
Mutable variables can appeal to parametricty only if they are not captured.
We use "not captured by any closure" as a sound approximation for that, since
variables themselves are currently not tracked, so we cannot use soemthing
more finegrained.
// DO NOT REFERENCE `ll` ANYWHERE ELSE, OR IT WILL LEAK THE HEAD
1001
-
varrestRef= ll // val restRef = new ObjectRef(ll)
1001
+
varrestRef:LazyListIterable[A@uncheckedCaptures]^{cap[filterImpl]} = ll // restRef is captured by closure arg to newLL, so A is not recognized as parametric
// DO NOT REFERENCE `ll` ANYWHERE ELSE, OR IT WILL LEAK THE HEAD
1018
-
varrestRef= ll // val restRef = new ObjectRef(ll)
1018
+
varrestRef:LazyListIterable[A@uncheckedCaptures]^{cap[collectImpl]} = ll // restRef is captured by closure arg to newLL, so A is not recognized as parametric
1019
1019
newLL {
1020
1020
valmarker=Statics.pfMarker
1021
1021
valtoMarker= anyToMarker.asInstanceOf[A=>B] // safe because Function1 is erased
// DO NOT REFERENCE `ll` ANYWHERE ELSE, OR IT WILL LEAK THE HEAD
1037
-
varrestRef= ll // val restRef = new ObjectRef(ll)
1037
+
varrestRef:LazyListIterable[A@uncheckedCaptures]^{cap[flatMapImpl]} = ll // restRef is captured by closure arg to newLL, so A is not recognized as parametric
// DO NOT REFERENCE `ll` ANYWHERE ELSE, OR IT WILL LEAK THE HEAD
1061
-
varrestRef= ll // val restRef = new ObjectRef(ll)
1061
+
varrestRef:LazyListIterable[A@uncheckedCaptures]^{cap[dropImpl]} = ll // restRef is captured by closure arg to newLL, so A is not recognized as parametric
// DO NOT REFERENCE `ll` ANYWHERE ELSE, OR IT WILL LEAK THE HEAD
1078
-
varrestRef= ll // val restRef = new ObjectRef(ll)
1078
+
varrestRef:LazyListIterable[A@uncheckedCaptures]^{cap[dropWhileImpl]} = ll // restRef is captured by closure arg to newLL, so A is not recognized as parametric
// DO NOT REFERENCE `ll` ANYWHERE ELSE, OR IT WILL LEAK THE HEAD
1091
-
varrestRef= ll // val restRef = new ObjectRef(ll)
1092
-
varscoutRef= ll //val scoutRef = new ObjectRef(ll)
1091
+
varrestRef:LazyListIterable[A@uncheckedCaptures]^{cap[takeRightImpl]} = ll // restRef is captured by closure arg to newLL, so A is not recognized as parametric
0 commit comments