Skip to content

Regression in lichess/lila during access to contextual member in Tuple arrow #26801

Description

@WojciechMazur

Based on the OpenCB failure in lichess/lila

Compiler version

Last good release: 3.10.0-RC1-bin-20260630-a8ae375-NIGHTLY
First bad release: 3.10.0-RC1-bin-20260701-14f4239-NIGHTLY
Bisect points to 4f67b39

Minimized code

class Context(val lang: String)

inline def ctx(using it: Context): Context = it

def test(xs: List[Int])(using Context): List[(Int, String)] =
  xs.map(tid => tid -> ctx.lang)

Output

❯ scala compile ../community-build3/test.scala -S 3.nightly --server=false
-- Error: /Users/wmazur/projects/scala/community-build3/test.scala:13:13 -------
13 |  xs.map(tid => tid -> ctx.lang)
   |         ^^^^^^^^^^^^^^^^^^^^^^
   |         cannot establish a reference to Context#lang
1 error found

Expectation

Metadata

Metadata

Assignees

No one assigned

    Labels

    itype:bugregressionThis worked in a previous version but doesn't anymorestat:needs triageEvery issue needs to have an "area" and "itype" label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions