Skip to content

Commit a43859c

Browse files
committed
Fix tests
- tests/pos/automatic-tupling-of-function-parameters.scala This test requires dealiasing. - tests/run/function-arity.scala This test requires widen ExprType. - tests/pos/i6199a.scala It uses a feature which should not be supported.
1 parent 72053c3 commit a43859c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

compiler/src/dotty/tools/dotc/typer/Applications.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ object Applications {
116116
}
117117

118118
def tupleComponentTypes(tp: Type)(using Context): List[Type] =
119-
tp match
119+
tp.widenExpr.dealias match
120120
case tp: AppliedType =>
121121
if defn.isTupleClass(tp.tycon.typeSymbol) then
122122
tp.args

tests/pos/i6199a.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ case class ValueWithEncoder[T](value: T, encoder: Encoder[T])
33

44
object Test {
55
val a: Seq[ValueWithEncoder[_]] = Seq.empty
6-
val b = a.map((value, encoder) => encoder.encode(value))
6+
val b = a.map(ve => ve.encode(ve.value, ve.encoder))
77
val c: Seq[String] = b
88
}

tests/run/i10958.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ object U:
44
@main
55
def Test =
66
"" match
7-
case s"${U(u)})" =>
7+
case s"${U(u)}" =>
88
val x: String = u

0 commit comments

Comments
 (0)