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

False positive warning when returning a tuple of wildcard type #10142

Open
scabug opened this issue Jan 11, 2017 · 1 comment
Open

False positive warning when returning a tuple of wildcard type #10142

scabug opened this issue Jan 11, 2017 · 1 comment
Labels
existential fixed in Scala 3 This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/) infer
Milestone

Comments

@scabug
Copy link

scabug commented Jan 11, 2017

Welcome to Scala 2.12.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_102).
Type in expressions for evaluation. Or try :help.

scala> val (a, b) = (getClass, getClass)
<console>:11: warning: inferred existential type (Class[?0], Class[?0]) forSome { type ?0 <: type; type ?0 <: type }, which cannot be expressed by wildcards,  should be enabled
by making the implicit value scala.language.existentials visible.
This can be achieved by adding the import clause 'import scala.language.existentials'
or by setting the compiler option -language:existentials.
See the Scaladoc for value scala.language.existentials for a discussion
why the feature should be explicitly enabled.
       val (a, b) = (getClass, getClass)
           ^
a: Class[_ <: type] = class 
b: Class[_ <: type] = class 
@scabug
Copy link
Author

scabug commented Jan 11, 2017

Imported From: https://issues.scala-lang.org/browse/SI-10142?orig=1
Reporter: @Atry
Affected Versions: 2.12.1

@SethTisue SethTisue added the fixed in Scala 3 This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/) label Mar 22, 2024
@SethTisue SethTisue added this to the Backlog milestone Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
existential fixed in Scala 3 This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/) infer
Projects
None yet
Development

No branches or pull requests

2 participants