Skip to content

Regression in estrondo/farango #18350

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
WojciechMazur opened this issue Aug 7, 2023 · 3 comments
Closed

Regression in estrondo/farango #18350

WojciechMazur opened this issue Aug 7, 2023 · 3 comments
Labels
area:typer itype:bug regression This worked in a previous version but doesn't anymore

Comments

@WojciechMazur
Copy link
Contributor

Open CB regression found in estrondo/farango - build logs

Compiler version

3.3.1-RC1-bin-20230515-22b2259-NIGHTLY
3.3.1-RC4

Bisect points to d1d6c2e

Minimized code

import scala.collection.Factory

trait EffectStream[S[_]]:
  def fromJavaStream[A]: S[A]

given [I[_] <: Iterable[_]](using Factory[Any, I[Any]]): EffectStream[I] with
  override def fromJavaStream[A]: I[A] = {
    val builder = summon[Factory[_, I[_]]].newBuilder
    ???
  }

Output

-- [E043] Type Error: /Users/wmazur/projects/dotty/bisect/main.scala:8:36 ------
8 |    val builder = summon[Factory[_, I[_]]].newBuilder
  |                                    ^^^^
  |     unreducible application of higher-kinded type I to wildcard arguments
  |
  | longer explanation available when compiling with `-explain`

Expectation

Probably should compile

@WojciechMazur WojciechMazur added itype:bug area:typer regression This worked in a previous version but doesn't anymore labels Aug 7, 2023
@WojciechMazur
Copy link
Contributor Author

The bisected commit was fixing #17168
@odersky is it actually typer improvement, and not a regression?

@dwijnand
Copy link
Member

dwijnand commented Aug 7, 2023

Yeah, it's not a regression. I'm not sure about the original, but to me it looks like it should be summon[Factory[Any, I[Any]]].newBuilder.

(Edit) yeah in the original as well.

@odersky
Copy link
Contributor

odersky commented Aug 7, 2023

If I understood Dale correctly, it looks like an error in the program that is now correctly diagnosed.

@WojciechMazur WojciechMazur closed this as not planned Won't fix, can't repro, duplicate, stale Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:typer itype:bug regression This worked in a previous version but doesn't anymore
Projects
None yet
Development

No branches or pull requests

3 participants