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

Missing warning infer-any in function result #12861

Open
som-snytt opened this issue Sep 3, 2023 · 0 comments
Open

Missing warning infer-any in function result #12861

som-snytt opened this issue Sep 3, 2023 · 0 comments

Comments

@som-snytt
Copy link

Reproduction steps

Scala version: 2.13.11

$ scala -Vprint -Xlint -Dscala.repl.info

scala 2.13.11> import scala.collection.{AnyStepper, Stepper}

scala 2.13.11> def f[A, B](x: => AnyStepper[A], y: => Stepper[B]): Unit = {
             | List(() => x, () => y)
             | }
[[syntax trees at end of                     typer]] // <console>

      def f[A, B](x: => scala.collection.AnyStepper[A], y: => scala.collection.Stepper[B]): Unit = {
        scala.`package`.List.apply[() => scala.collection.Stepper[Any]]((() => x), (() => y));
        ()
      }

Problem

It inferred Any but did not warn.

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