E085: Function Type Needs Non-Empty Parameter List

This error was removed before Scala 3.0.0 was released and was never emitted by the Scala 3 compiler. This error was triggered when attempting to define implicit or erased function types with empty parameter lists.

Example (would have failed in early Dotty versions)

type Contextual[T] = implicit () => T
val x: implicit () => Int
val y: erased () => Int
val z: erased implicit () => Int

Error

-- Error: example.scala:1:26 ---------------------------------------------------
1 |type Contextual[T] = implicit () => T
  |                              ^^
  |implicit function type needs non-empty parameter list

Explanation

In early versions of Dotty (before Scala 3.0.0), it was not allowed to leave implicit or erased function parameter lists empty. This restriction was removed in commit d34b677d88 (May 2018) as it was considered an unnecessary limitation.

The error message suggested defining the function types with explicit parameters:

type Transactional[T] = implicit Transaction => T
val cl: implicit A => B

Since Scala 3.0.0, empty parameter lists are allowed for implicit and erased function types, making this error obsolete.