We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 01b404f + 0345a3c commit cfc51b0Copy full SHA for cfc51b0
tests/run/named-tuples.scala
@@ -117,3 +117,12 @@ object Conv:
117
def f22(x: (String, Int)) = x._1
118
def f22(x: String) = x
119
f22(bob)
120
+
121
+object SingletonExpectedTypes:
122
+ // original code from issue https://github.com/scala/scala3/issues/20267
123
+ type TripleSingle = ("Lausanne", 1000, 140000)
124
+ type CitySingle = (name: "Lausanne", zip: 1000, pop: 140000)
125
126
+ def test =
127
+ val tripleSingle: TripleSingle = ("Lausanne", 1000, 140000) // OK
128
+ val citySingle: CitySingle = (name = "Lausanne", zip = 1000, pop = 140000) // error
0 commit comments