-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove empty argument lists for classes with only context bounds
Closes #21418
- Loading branch information
Showing
4 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
trait Effect[F[_]] | ||
class Countdown[F[_]: Effect] | ||
class Countdown1[F[_]: Effect](howMany: Int) | ||
class Countdown2[F[_]: Effect, F2[_]: Effect] | ||
|
||
def foo[F[_]: Effect]() = | ||
"foo" | ||
|
||
@main def Test = { | ||
val a = new Countdown[Option](using ???) | ||
val b = Countdown[Option](using ???) | ||
new Countdown[Option](using ???) | ||
val c = Countdown[List](using ???) | ||
new Countdown2[List, Option](using ???, ???) | ||
Countdown2[List, Option](using ???, ???) | ||
new Countdown1[Option](10)(using ???) | ||
new Array[Int](10) | ||
new scala.collection.immutable.HashSet[Int] | ||
new scala.collection.immutable.HashSet[Int]() | ||
new scala.collection.immutable.HashSet[Int] () | ||
foo()(using ???) | ||
foo() (using ???) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
trait Effect[F[_]] | ||
class Countdown[F[_]: Effect] | ||
class Countdown1[F[_]: Effect](howMany: Int) | ||
class Countdown2[F[_]: Effect, F2[_]: Effect] | ||
|
||
def foo[F[_]: Effect]() = | ||
"foo" | ||
|
||
@main def Test = { | ||
val a = new Countdown[Option]()(???) | ||
val b = Countdown[Option]()(???) | ||
new Countdown[Option] ()(???) | ||
val c = Countdown[List] () (???) | ||
new Countdown2[List, Option] () (???, ???) | ||
Countdown2[List, Option] () (???, ???) | ||
new Countdown1[Option](10)(???) | ||
new Array[Int](10) | ||
new scala.collection.immutable.HashSet[Int] | ||
new scala.collection.immutable.HashSet[Int]() | ||
new scala.collection.immutable.HashSet[Int] () | ||
foo()(???) | ||
foo() (???) | ||
} |