We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bbd8d81 commit 1e7243aCopy full SHA for 1e7243a
compiler/src/dotty/tools/dotc/core/Definitions.scala
@@ -1137,9 +1137,8 @@ class Definitions {
1137
* Extracts the list of function argument types, the result type and whether function is contextual.
1138
*/
1139
def unapply(tpe: AppliedType)(using Context): Option[(List[Type], Type, Boolean)] = {
1140
- val targs = tpe.args
1141
- if targs.isEmpty || !isFunctionNType(tpe) then None
1142
- 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)
1143
}
1144
1145
0 commit comments