question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Implicit keyword should not be allowed on return types

See original GitHub issue
def 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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
oderskycommented, May 24, 2017

The restriction is already in the grammar. The parser should reflect that.

1reaction
biboudiscommented, May 23, 2017

Good catch! Pair-fix it tomorrow?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found