Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implicitNotFound annotations on parameters are lost through export #20127

Closed
natsukagami opened this issue Apr 8, 2024 · 1 comment · Fixed by #20140
Closed

implicitNotFound annotations on parameters are lost through export #20127

natsukagami opened this issue Apr 8, 2024 · 1 comment · Fixed by #20140
Assignees
Labels
area:export itype:bug Spree Suitable for a future Spree
Milestone

Comments

@natsukagami
Copy link
Contributor

Compiler version

3.3.2, 3.4.1, latest main (20ae563)

Minimized code

import scala.annotation.*

trait X

object Foo:
  def foo(using @implicitNotFound("foo!") x: X) = "foo"

object FooClone:
  export Foo.foo
  
object Main:
  val n = 10
  Foo.foo
  FooClone.foo

Output

-- [E172] Type Error: Test.scala:13:9 ------------------------------------------
13 |  Foo.foo
   |         ^
   |         foo!
-- [E172] Type Error: Test.scala:14:14 -----------------------------------------
14 |  FooClone.foo
   |              ^
   |No given instance of type X was found for parameter x of method foo in object FooClone

Note that the FooClone.foo call no longer emits the custom error message "foo!".

Expectation

Calling FooClone.foo should properly give the custom error message.

@natsukagami natsukagami added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Apr 8, 2024
@hamzaremmal hamzaremmal self-assigned this Apr 9, 2024
@hamzaremmal hamzaremmal added Spree Suitable for a future Spree area:export and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Apr 9, 2024
@hamzaremmal
Copy link
Member

hamzaremmal commented Apr 9, 2024

We are currently working on this issue for the spree with @jan-pieter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:export itype:bug Spree Suitable for a future Spree
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants