Skip to content

a curious case of ill-scoped references when argument list and callee are in different scopes #7881

Open
@scabug

Description

@scabug
object Test {
  def main(args: Array[String]) {
    val x = "a"
    val result = (
      {
        val x = "b"
        "b" ==
      }
    )(x)
    println(result)
  }
}

a) prints "true"
b) prints "false"
c) compile error: missing arguments for method == in class Object;
d) compiler crashes in GenICode

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions