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

Inference in varargs with Array causes compiler error in 2.8.1 RC1 #3859

Closed
scabug opened this issue Sep 21, 2010 · 4 comments
Closed

Inference in varargs with Array causes compiler error in 2.8.1 RC1 #3859

scabug opened this issue Sep 21, 2010 · 4 comments
Assignees

Comments

@scabug
Copy link

scabug commented Sep 21, 2010

The following compiles with scala 2.8.0:

package test

class Test {

  def foo: Unit = bar(Array(): _*)
  
  def bar(values: AnyRef*): Unit = ()
}

With 2.8.1 RC1, an error is issued:

test/Test.scala:5: error: type mismatch;
 found   : scala.reflect.Manifest[Nothing]
 required: scala.reflect.ClassManifest[T]
  def foo: Unit = bar(Array(): _*)

bar(ArrayAnyRef: _*) compiles with both versions.

@scabug
Copy link
Author

scabug commented Sep 21, 2010

Imported From: https://issues.scala-lang.org/browse/SI-3859?orig=1
Reporter: @ijuma

@scabug
Copy link
Author

scabug commented Sep 22, 2010

@paulp said:
r22727 is the culprit.

@scabug
Copy link
Author

scabug commented Sep 28, 2010

@adriaanm said:
(In r23128) closes #3859. need to instantiate type parameters to nothing explicitly in manifestOfType's searchresult rather than relying on later calls to instantiate.

review by odersky

@scabug
Copy link
Author

scabug commented Sep 28, 2010

@adriaanm said:
(In r23129) partial revert of r23128 ("see #3859. need to instantiate type parameters to nothing explicitly in manifestOfType's searchresult rather than relying on later calls to instantiate."): the isArray_apply test cleanup was not a good idea (my pre-commit automated testing turned out to be broken.. me.gitfu--)

no review

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