-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1623 from OlegYch/onlyImplicits
Add an option to only add explicit result types to implicit definitions
- Loading branch information
Showing
4 changed files
with
19 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
10 changes: 10 additions & 0 deletions
10
...ts/input/src/main/scala-2/test/explicitResultTypes/ExplicitResultTypesOnlyImplicits.scala
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,10 @@ | ||
/* | ||
rules = ExplicitResultTypes | ||
ExplicitResultTypes.onlyImplicits = true | ||
*/ | ||
package test.explicitResultTypes | ||
|
||
object ExplicitResultTypesOnlyImplicits { | ||
def complex = List(1).map(_ + 1) | ||
implicit val default = complex | ||
} |
6 changes: 6 additions & 0 deletions
6
...s/output/src/main/scala-2/test/explicitResultTypes/ExplicitResultTypesOnlyImplicits.scala
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,6 @@ | ||
package test.explicitResultTypes | ||
|
||
object ExplicitResultTypesOnlyImplicits { | ||
def complex = List(1).map(_ + 1) | ||
implicit val default: List[Int] = complex | ||
} |