Skip to content

CC can't track parameters to superclasses #15114

Open
@anatoliykmetyuk

Description

@anatoliykmetyuk

Compiler version

cc-experiment head, 08597054504d8deeee543301b771c509074b8993 commit.

Minimized code

trait Foo(val m: {*} String):
  val x: {m} Int = 10

@main def Test =
  val y = new Foo("Mutation") {
    override val x: {m} Int = 20
  }

Output

-- Error: /Users/kmetiuk/Projects/scala3/playground/cc-demo/Test.scala:45:21 ---                                                                                                                                                                                                                            
45 |    override val x: {m} Int = 20
   |                     ^
   |     m cannot be tracked since it is not a parameter or a local variable

Expectation

Should compile.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions