File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 1+ -- [E042] Type Error: tests/neg-custom-args/i16601a.scala:1:27 ---------------------------------------------------------
2+ 1 |@main def Test: Unit = new concurrent.ExecutionContext // error
3+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
4+ | ExecutionContext is a trait; it cannot be instantiated
5+ |---------------------------------------------------------------------------------------------------------------------
6+ | Explanation (enabled by `-explain`)
7+ |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
8+ | Abstract classes and traits need to be extended by a concrete class or object
9+ | to make their functionality accessible.
10+ |
11+ | You may want to create an anonymous class extending ExecutionContext with
12+ | class ExecutionContext { }
13+ |
14+ | or add a companion object with
15+ | object ExecutionContext extends ExecutionContext
16+ |
17+ | You need to implement any abstract members in both cases.
18+ ---------------------------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 1+ @ main def Test : Unit = new concurrent.ExecutionContext // error
You can’t perform that action at this time.
0 commit comments