We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ceaebef commit ceb4dd9Copy full SHA for ceb4dd9
src/dotty/tools/dotc/core/Definitions.scala
@@ -284,7 +284,8 @@ class Definitions(implicit ctx: Context) {
284
object FunctionType {
285
def apply(args: List[Type], resultType: Type) =
286
FunctionClass(args.length).typeRef.appliedTo(args :+ resultType)
287
- def unapply(ft: Type) = {
+ def unapply(ft: Type): Option[(List[Type], Type)] = { // Dotty deviation: Type annotation needed because inferred type
288
+ // is Some[(List[Type], Type)] | None, which is not a legal unapply type.
289
val tsym = ft.typeSymbol
290
lazy val targs = ft.typeArgs
291
if ((FunctionClasses contains tsym) &&
0 commit comments