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

sourcecode.Name is incorrect when used as an implicit constructor arg on an abstract class #22

Open
fizzy33 opened this issue Sep 12, 2016 · 1 comment

Comments

@fizzy33
Copy link

fizzy33 commented Sep 12, 2016

The following fails

scala> abstract class Foo(implicit val name: sourcecode.Name)
defined class Foo

scala> val x = new Foo {}
x: Foo = $anon$1@b6bdc65

scala> x.name
res0: sourcecode.Name = Name($anon)

Here is a pull request with a unit test #18

@ryan-williams
Copy link
Contributor

I'm seeing this behavior in 0.1.7.

abstract class Foo(implicit val name: sourcecode.Name) { override val toString: String = name.value }
val x = new Foo {}  // x: Foo = $anon
x.name  // res1: sourcecode.Name = Name($anon)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants