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

Regression in zengularity/benji v2.2.0 #16337

Closed
dwijnand opened this issue Nov 14, 2022 · 2 comments
Closed

Regression in zengularity/benji v2.2.0 #16337

dwijnand opened this issue Nov 14, 2022 · 2 comments
Labels
area:overloading itype:bug regression This worked in a previous version but doesn't anymore

Comments

@dwijnand
Copy link
Member

[error] -- [E008] Not Found Error: /home/jenkins/agent/workspace/buildCommunityProject/repo/s3/src/test/scala/S3Spec.scala:62:9 
[error] 62 |      ls.list(Option.empty[String])({ t =>
[error]    |      ^^^^^^^
[error]    |value list is not a member of bucket.ListRequest - did you mean ls.wait?
[error] -- [E051] Reference Error: 


/home/jenkins/agent/workspace/buildCommunityProject/repo/s3/src/test/scala/S3Spec.scala:30:34 
[error] 30 |    "paginate the bucket objects" in withMatEx { implicit ee: EE =>
[error]    |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[error]    |Ambiguous overload. The overloaded alternatives of method in in class BlockExample with types
[error]    | (execution: org.specs2.specification.core.Execution):
[error]    |  org.specs2.specification.core.Fragment
[error]    | [R]
[error]    |  (parser: org.specs2.specification.script.StepParser[R])
[error]    |    (implicit evidence$6: org.specs2.execute.AsResult[R]):
[error]    |      org.specs2.specification.core.Fragment
[error]    | (fs: => org.specs2.specification.core.Fragments)
[error]    |  (implicit p1: org.specs2.control.ImplicitParameters.ImplicitParam1):
[error]    |    org.specs2.specification.core.Fragments
[error]    | (f: => org.specs2.specification.core.Fragment):
[error]    |  org.specs2.specification.core.Fragment
[error]    | [R]
[error]    |  (f: String => R)
[error]    |    (implicit ar: org.specs2.specification.core.AsExecution[R]):
[error]    |      org.specs2.specification.core.Fragment
[error]    | [R]
[error]    |  (r: => R)
[error]    |    (implicit evidence$4: org.specs2.specification.core.AsExecution[R]):
[error]    |      org.specs2.specification.core.Fragment
[error]    |all match arguments (Nothing)
[error]    |
[error]    | longer explanation available when compiling with `-explain`
[error] two errors found
[error] (s3 / Test / compileIncremental) Compilation failed
 trait ListRequest 
 def test() = {
   type StructType = {
     def list(nextToken: Option[String])(andThen: String => Source[Object, akka.NotUsed])(implicit  m:Materializer): Source[Object, akka.NotUsed]
    }
   val ls: bucket.ListRequest with StructType = ???
   ls.list(Option.empty[String])({ t =>
        tok1 = Some(t)
        Source.empty[Object]
      })
}
@dwijnand dwijnand changed the title zengularity/benji v2.2.0 Regression in zengularity/benji v2.2.0 Nov 14, 2022
@dwijnand dwijnand added itype:bug area:overloading regression This worked in a previous version but doesn't anymore labels Nov 14, 2022
odersky added a commit that referenced this issue Nov 15, 2022
Two fixes:

 1. Don't forget about refinements
 2. Don't dealias

Fixes #16342
Fixes #16338

The first fix is essential for #16342. The second fix is just to keep
types tidy and not open aliases needlessly.

It probably fixes issues #16337 and #16336 as well, but the test cases
were not self-contained, so I could not try them out. It might fix other
recent regressions as well.

The previous incorrect version hid errors in previous regressions #15365
and #16311 which will need to be re-opened now.
@odersky
Copy link
Contributor

odersky commented Nov 16, 2022

would be good to check again. I hope it is fixed by #16344.

@Kordyjan Kordyjan added this to the Future versions milestone Dec 12, 2022
@WojciechMazur
Copy link
Contributor

Project is passing OpenCB with the latest compiler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:overloading itype:bug regression This worked in a previous version but doesn't anymore
Projects
None yet
Development

No branches or pull requests

4 participants