-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:named-tuplesIssues tied to the named tuples feature.Issues tied to the named tuples feature.itype:bug
Milestone
Description
Compiler version
Minimized code
//> using scala 3.nightly
import scala.language.experimental.namedTuples
case class City(name: String, population: Int)
def getCityInfo(city: City) =
city match
case City(iam = n, confused = p) => s"[City] $n has a population of $p !!!!!!!!!!"
@main
def main =
val city = City(name = "New York", population = 8_000_000)
println(getCityInfo(city))
Output
[City] New York has a population of 8000000 !!!!!!!!!!
Expectation
Compilation error, that iam
and confused
aren't fields of the class City
noti0na1, OndrejSpanel and He-Pin
Metadata
Metadata
Assignees
Labels
area:named-tuplesIssues tied to the named tuples feature.Issues tied to the named tuples feature.itype:bug