Skip to content

Type binding cannot be read from TASTY #3500

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

Closed
nicolasstucki opened this issue Nov 17, 2017 · 3 comments
Closed

Type binding cannot be read from TASTY #3500

nicolasstucki opened this issue Nov 17, 2017 · 3 comments

Comments

@nicolasstucki
Copy link
Contributor

When compiling from tasty (tests in tests/posFromTasty/)

trait Map2[K] {
  def get(k: K): K = k
  def foo: K = {
    this match {
      case that: Map2[b] => that.get(3.asInstanceOf[b])
      case that: Map2[b] => that.get(3.asInstanceOf[K])
      case _ => get(5.asInstanceOf[K])
    }
  }
}

When recompiling the code loaded from tasty, the references of b become redefinitions of b. There are also positions missing from.

nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Nov 17, 2017
@smarter
Copy link
Member

smarter commented Nov 17, 2017

This was previously discussed but not fully resolved in #2958

@nicolasstucki
Copy link
Contributor Author

https://github.com/dotty-staging/dotty/tree/fix-bind-ambiguity has a first step that @DarkDimius implemented back then and some work I made on top to finish it. Unfortunately I currently a bit blocked on this one.

@DarkDimius do you still remember this issue and do you have some useful pointers?

@nicolasstucki
Copy link
Contributor Author

nicolasstucki commented Nov 17, 2017

After that file is compiled, we can reproduce the issue with dotc -from-tasty -classpath . Map2 -Ycheck:all or dotc -decompile -classpath . Map2

nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Nov 24, 2017
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Nov 24, 2017
@nicolasstucki nicolasstucki changed the title Type binding cannot be read from tasty Type binding cannot be read from TASTY Nov 30, 2017
@smarter smarter closed this as completed in 7ead0b0 Aug 9, 2018
smarter added a commit that referenced this issue Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants