Skip to content

Remove internal.quoted.{ExprCastError, ScopeException} #10229

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

Merged

Conversation

nicolasstucki
Copy link
Contributor

Part of #10222

@nicolasstucki nicolasstucki self-assigned this Nov 8, 2020
@nicolasstucki nicolasstucki changed the title Remove internal.quoted.ExprCastError Remove internal.quoted.{ExprCastError, ScopeException} Nov 8, 2020
Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -25,7 +25,7 @@ package scala {
case '{$x: Foo} => Expr(run(x).x)
}
} catch {
case ex: scala.internal.quoted.ScopeException =>
case ex: Exception if ex.getMessage == "Cannot call `scala.quoted.staging.run(...)` within a macro or another `run(...)`" =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test is a little brittle. I guess it is temporary given the other refactoring is in process.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I manage to create the exception class in the compiler code. Then the tests would need to have the compiler in the classpath to know that exception type. For this I must first move the implementation of scala.internal.quoted.Expr into the compiler which is in process.

@nicolasstucki nicolasstucki merged commit f2d546c into scala:master Nov 9, 2020
@nicolasstucki nicolasstucki deleted the remove-Expr-cast-exception branch November 9, 2020 08:28
@Kordyjan Kordyjan added this to the 3.0.0 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants