Skip to content

Remove empty tree after erasure to pass -Ycheck:all #2415

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

Merged
merged 1 commit into from
May 15, 2017

Conversation

liufengyun
Copy link
Contributor

A simple fix to make sure that empty trees are removed after erasure. This avoids exception with -Ycheck:all.

This problem doesn't occur in the test set because we didn't enable -Ycheck:erasure and the empty trees are accidentally removed in the next phase.

@felixmulder Do you think it makes sense to -Ycheck:erasure on all tests?

@felixmulder
Copy link
Contributor

Hmm, I'm not sure all phases are Ycheckable anyway, @DarkDimius ?

@DarkDimius
Copy link
Contributor

DarkDimius commented May 12, 2017 via email

@felixmulder
Copy link
Contributor

Ok, then LGTM :)

@liufengyun
Copy link
Contributor Author

Thanks @felixmulder @DarkDimius . I just added -Ycheck:erasure, let's see if the CI is happy with the change.

@felixmulder
Copy link
Contributor

felixmulder commented May 12, 2017

 override final def toString$extension($this: ErasedValueType(Test.Bar, ErasedValueType(Test.Foo, String))): String = 
    "".+(new Test.Foo(Test.Foo.evt2u$(new Test.Bar(Test.Foo.u2evt$($this)).f())))
  override final def hashCode$extension($this: ErasedValueType(Test.Bar, ErasedValueType(Test.Foo, String))): Int = 
    Test.Foo.hashCode$extension(new Test.Bar(Test.Foo.u2evt$($this)).f())
  override final def equals$extension($this: ErasedValueType(Test.Bar, ErasedValueType(Test.Foo, String)), x$0: Object)
    : 
  Boolean = 
    {
      case val selector2: Object = x$0
      {
        def case3(): Boolean = 
          {
            def case4(): Boolean = 
              {
                def matchFail2(): Boolean = throw new MatchError(selector2)
                if selector2.isInstanceOf[Object] then 

Hmm, ErasedValueType - instinctly, looks like that's not Ycheck-able

@liufengyun
Copy link
Contributor Author

Thanks @felixmulder. It's good to know. I just retracted the last commit.

@DarkDimius
Copy link
Contributor

DarkDimius commented May 12, 2017 via email

@felixmulder
Copy link
Contributor

"Intuitively" => "Haven't looked at it too much, still trying to help"

@felixmulder
Copy link
Contributor

Merging this and tracking the status via: #2430

@felixmulder felixmulder merged commit 031879a into scala:master May 15, 2017
@allanrenucci allanrenucci deleted the fix-erasure branch December 14, 2017 19:20
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

Successfully merging this pull request may close these issues.

3 participants