Context bound desugared at the wrong place in extension method
See original GitHub issueCompiler version
3.0.0-RC1
Minimized code
trait Conv[T]
extension [T: Conv](x: T)
def combine (y: T): T = ???
Compiler output with -Xprint:typer
extension [T >: Nothing <: Any](x: T) def combine(y: T)(
implicit evidence$1: test.Conv[T]
): T = ???
Expectation
extension [T >: Nothing <: Any](x: T)(using x$2: test.Conv[T]) def combine(
y: T
): T = ???
, obtained with “using” syntax:
extension [T](x: T)(using Conv[T])
def combine (y: T): T = ???
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Using extension methods within inline databinding context
I'm trying to use some extension methods that I use to apply consistent formatting to DateTime and Int32 - which works absolutely fine...
Read more >Extension Methods - Scala 3 - EPFL
An extension method translates to a specially labelled method that takes the leading parameter section as its first argument list.
Read more >Extension Methods - C# Programming Guide - Microsoft Learn
Extension methods in C# enable you to add methods to existing types without creating a new ... Binding Extension Methods at Compile Time ......
Read more >10.1. Language options — Glasgow Haskell Compiler 8.2.2 ...
The literal -123 is, according to Haskell98 and Haskell 2010, desugared as negate (fromInteger 123). The language extension -XNegativeLiterals means that it ...
Read more >Reactor 3 Reference Guide
The reactive programming paradigm is often presented in object-oriented languages as an extension of the Observer design pattern. You can also ...
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 Free
Top 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
@odersky IMHO the suggested desugaring makes more sense and it still makes it possible to pass
Conv[T]
explicitly although the order of arguments would be different@odersky I understand it if you don’ have time for this, but can we keep the issue open so that others can take over. Thanks!