We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8201ceb commit 719fdd9Copy full SHA for 719fdd9
compiler/src/dotty/tools/dotc/core/Definitions.scala
@@ -1139,9 +1139,8 @@ class Definitions {
1139
* Extracts the list of function argument types, the result type and whether function is contextual.
1140
*/
1141
def unapply(tpe: AppliedType)(using Context): Option[(List[Type], Type, Boolean)] = {
1142
- val targs = tpe.args
1143
- if targs.isEmpty || !isFunctionNType(tpe) then None
1144
- else Some(targs.init, targs.last, tpe.typeSymbol.name.isContextFunction)
+ if !isFunctionNType(tpe) then None
+ else Some(tpe.args.init, tpe.args.last, tpe.typeSymbol.name.isContextFunction)
1145
}
1146
1147
0 commit comments