-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
itype:bugstat:needs triageEvery issue needs to have an "area" and "itype" labelEvery issue needs to have an "area" and "itype" label
Description
blocker for Make -> sugar an inline method #24728
Compiler version
main branch @ ba45875
Minimized code
taken from an error in library/src/scala/collection/package.scala when trying to make Predef.ArrowAssoc inline
import language.experimental.{captureChecking, separationChecking}
import scala.collection.SeqOps
extension [A](self: A) inline def --> [B](y: B): (A, B) = (self, y)
object +: {
def unapply[A, CC[_] <: Seq[?], C <: SeqOps[A, CC, C]](t: (C & SeqOps[A, CC, C])^): Option[(A, C^{t})] =
if(t.isEmpty) None
else Some(t.head --> t.tail)
}Output
-- [E007] Type Mismatch Error: local/reproducer.scala:10:14 --------------------
10 | else Some(t.head --> t.tail)
| ^^^^^^^^^^^^^^^^^
| Found: (A^'s1, C^{y$proxy1})
| Required: (A, C)
|
| Note that capability y$proxy1 is not included in capture set {}.
|----------------------------------------------------------------------------
|Inline stack trace
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|This location contains code that was inlined from reproducer.scala:5
5 |extension [A](self: A) inline def --> [B](y: B): (A, B) = (self, y)
| ^^^^^^^^^
----------------------------------------------------------------------------
|
| longer explanation available when compiling with `-explain`
1 error foundExpectation
i would not expect inline proxy values in capture sets
Metadata
Metadata
Assignees
Labels
itype:bugstat:needs triageEvery issue needs to have an "area" and "itype" labelEvery issue needs to have an "area" and "itype" label