Closed as not planned
Description
Compiler version
Works on 3.2.2 and fails on 3.3.2 and 3.5.0.
Minimized code
object PatchG:
inline def apply[EL, MG <: DNIELMG[EL]](inline mg: MG)(inline ptps: List[(mg.Node | C.type, mg.Node | C.type)]): PatchG[EL, MG]
Output
[error] -- [E083] Type Error: /home/anneline/IdeaProjects/LLGraph/src/main/scala/be.adamv.llgraph/graphs/PatchG.scala:112:76
[error] 112 | inline def apply[EL, MG <: DNIELMG[EL]](inline mg: MG)(inline ptps: List[(mg.Node | C.type, mg.Node | C.type)]): PatchG[EL, MG] =
[error] | ^^
[error] |(mg : MG) is not a valid type prefix, since it is not an immutable path
[error] |---------------------------------------------------------------------------
[error] | Explanation (enabled by `-explain`)
[error] |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[error] | An immutable path is
[error] | - a reference to an immutable value, or
[error] | - a reference to `this`, or
[error] | - a selection of an immutable path with an immutable value.
[error] ---------------------------------------------------------------------------
Expectation
To compile, since the inlined version does type-check.
Example usage:
val rhs = DNIELMG[Char]()
val r = rhs.newNodes(2)
rhs.connect(r(0), r(0), 'b')
val rpg = PatchG[Char, rhs.type](rhs)(List(C -> r(0), r(1) -> C))