Skip to content

Have inline extension methods been dropped???? #10796

Closed
@deusaquilus

Description

@deusaquilus

Minimized code

I used to be able to do this in M2:

  inline given Functor[List]:
    extension [A, B](inline xs: List[A])
      inline def map(inline f: A => B): List[B] = xs.map(f)

Now it just throws an error:

[error] -- Error: /Users/aleiof/git/dotty_test/src/main/scala/miniquill/TypeclassExample_Functor.scala:20:21 
[error] 20 |    extension [A, B](inline xs: List[A]) {
[error]    |                     ^
[error]    |                     `inline` must be followed by an `if` or a `match`

PLEASE tell me this functionality has not been dropped. I have based SOOO many plans for Quill based on it!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions