Implicit keyword should not be allowed on return types
See original GitHub issuedef foo1(f: Int => implicit Int): Int = ???
def foo2(f: Int => Int): implicit Int = ???
Are currently allowed but do nothing, there should be an error.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Implicit conversion not allowed on return - c++ - Stack Overflow
When an object of type optional< T > is contextually converted to bool, the conversion returns true if the object contains a value...
Read more >Proposal: Supplementing Implicit Types #19550 - GitHub
In a type expression, I would like to be able to extend the implicitly known type of a value with specific type information....
Read more >Chapter 5. Using implicits to write expressive code - Scala in ...
Foo] returns the implicit list defined within Foo 's companion object. This mechanism is used to implement type traits sometimes called type classes....
Read more >Pitch: Implicit Returns from Single-Expression Functions
It is reasonable to be able to call a function (here, logAndReturn ) which returns a value as the only operation performed by...
Read more >Contextual Parameters, aka Implicit Parameters | Tour of Scala
A method can have contextual parameters, also called implicit parameters, or more concisely implicits. Parameter lists starting with the keyword using (or ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The restriction is already in the grammar. The parser should reflect that.
Good catch! Pair-fix it tomorrow?