Skip to content

Commit

Permalink
fix issue #20267 with regression test (#20506)
Browse files Browse the repository at this point in the history
As mentioned in #20267, the new desugaring from
#20497 seems to fix the issue

fixes #20267
  • Loading branch information
bishabosha authored Jun 2, 2024
2 parents 01b404f + 0345a3c commit cfc51b0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/run/named-tuples.scala
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,12 @@ object Conv:
def f22(x: (String, Int)) = x._1
def f22(x: String) = x
f22(bob)

object SingletonExpectedTypes:
// original code from issue https://github.com/scala/scala3/issues/20267
type TripleSingle = ("Lausanne", 1000, 140000)
type CitySingle = (name: "Lausanne", zip: 1000, pop: 140000)

def test =
val tripleSingle: TripleSingle = ("Lausanne", 1000, 140000) // OK
val citySingle: CitySingle = (name = "Lausanne", zip = 1000, pop = 140000) // error

0 comments on commit cfc51b0

Please sign in to comment.