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

Option of nested trait causes "method has incompatible type" error #60

Open
DGolubets opened this issue May 2, 2014 · 2 comments
Open

Comments

@DGolubets
Copy link

Here is the type I want to macro mock:

trait SimpleService {
  trait SomeTypeLike {
    val text: String
  }

  def getSomething: Option[SomeTypeLike]
}

But I get compile error:

method getSomething has incompatible type

However, if I change the return type from Option[SomeTypeLike] to SomeTypeLike it compiles. If I move SomeTypeLike out of SimpleService - compiles too.

Complete sample: https://drive.google.com/file/d/0B54NYsj9RHeaanRsNDVUQjgwMzA/edit?usp=sharing

@paulbutcher
Copy link
Owner

Thanks. But I'm afraid that this is definitely one of those examples that will have to wait for Palladium

@goshacodes
Copy link
Contributor

Complied with Scala 3. This can be closed

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

5 participants