-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Regression in thoughtworksinc / binding.scala
#19191
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
Labels
area:metaprogramming:quotes
Issues related to quotes and splices
area:typer
itype:bug
regression
This worked in a previous version but doesn't anymore
Milestone
Comments
WojciechMazur
pushed a commit
that referenced
this issue
Dec 5, 2023
The intention of this change is to make it simpler to read the error message. List the expected type and actual type before the expression. This is usually the most important information and simpler to parse as the expression can get quite long. For the expected type, the actual type and the expression, we print the value in the same line if its String representation has only one line. Otherwise we print it in the next line with an indentation and extra new line at the end. Before: ``` java.lang.Exception: Expr cast exception: ((a: scala.Int) => ({ val v: scala.Int = a Binding.apply[scala.Unit](()) }: Binding[scala.Unit])) of type: scala.Function1[scala.Int, scala.Unit] did not conform to type: scala.Function1[scala.Int, Binding[scala.Unit]] at scala.quoted.runtime.impl.QuotesImpl.asExprOf(QuotesImpl.scala:76) ... ``` Example from #19191 After: ``` scala.quoted.runtime.impl.ExprCastException: Expected type: scala.Function1[scala.Int, scala.Unit] Actual type: scala.Function1[scala.Int, Binding[scala.Unit]] Expression: ((a: scala.Int) => ({ val v: scala.Int = a Binding.apply[scala.Unit](()) }: Binding[scala.Unit])) at scala.quoted.runtime.impl.QuotesImpl.asExprOf(QuotesImpl.scala:...) ... ```
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Jan 10, 2024
nicolasstucki
added a commit
that referenced
this issue
Jan 12, 2024
WojciechMazur
pushed a commit
that referenced
this issue
Jun 25, 2024
The intention of this change is to make it simpler to read the error message. List the expected type and actual type before the expression. This is usually the most important information and simpler to parse as the expression can get quite long. For the expected type, the actual type and the expression, we print the value in the same line if its String representation has only one line. Otherwise we print it in the next line with an indentation and extra new line at the end. Before: ``` java.lang.Exception: Expr cast exception: ((a: scala.Int) => ({ val v: scala.Int = a Binding.apply[scala.Unit](()) }: Binding[scala.Unit])) of type: scala.Function1[scala.Int, scala.Unit] did not conform to type: scala.Function1[scala.Int, Binding[scala.Unit]] at scala.quoted.runtime.impl.QuotesImpl.asExprOf(QuotesImpl.scala:76) ... ``` Example from #19191 After: ``` scala.quoted.runtime.impl.ExprCastException: Expected type: scala.Function1[scala.Int, scala.Unit] Actual type: scala.Function1[scala.Int, Binding[scala.Unit]] Expression: ((a: scala.Int) => ({ val v: scala.Int = a Binding.apply[scala.Unit](()) }: Binding[scala.Unit])) at scala.quoted.runtime.impl.QuotesImpl.asExprOf(QuotesImpl.scala:...) ... ``` [Cherry-picked 7480582]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area:metaprogramming:quotes
Issues related to quotes and splices
area:typer
itype:bug
regression
This worked in a previous version but doesn't anymore
Regression found in Open Community Build for
thoughtworksinc/binding.scala
build logsCompiler version
Last good release: 3.4.0-RC1-bin-20230726-97677cc-NIGHTLY
First bad release: 3.4.0-RC1-bin-20230727-ac69c66-NIGHTLY
Works in 3.3.1
Affects Scala 3.3.2 LTS backports
Bisect was not accurate enough, the commit of bisect result failed with other errors when building compiler
Regression candidate commits:
ac69c66 (bad) Ondřej Lhoták : add test for issue #17997 affecting the global object initialization checker (#18141)
d903d35 Nicolas Stucki: Add regression test (#18287)
cb73f0b EnzeXing: Add test for modifying this to AndType
c04d2db Jędrzej Rochala: Update scala3-presentation-compiler to 39e349e (#18296)
989c55c (bad) Jan Chyb : Fix regression #17245: Overloaded methods with ClassTags (#18286)
4b67b34 (bad, other error) Nicolas Stucki : Set missing expansion span for copied inlined node (#18229)
182331b (good) Nicolas Stucki : Support polymorphic functions with erased parameters (#18293)
5625107 Nicolas Stucki: Support polymorphic functions with erased parameters
f22f9db (bad, other error) Julien Richard-Foy : Set missing expansion span for copied inlined node
101ce3a Jan Chyb: Fix regression with Overloaded methods returning Functions
f5313ae EnzeXing: add fix for issue #17997 affecting the global object initialization checker
96ca0b6 Ondrej Lhotak: add test for issue #17997 affecting the global object initialization checker
Minimized code
Output
Expectation
Should compile
The text was updated successfully, but these errors were encountered: