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

Use c.abort in macro error cases #305

Merged
merged 1 commit into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
package org.apache.pekko.http.ccompat

import scala.annotation.StaticAnnotation
import scala.language.experimental.macros

Check warning on line 17 in parsing/src/main/scala-2/org/apache/pekko/http/ccompat/pre213macro.scala

View workflow job for this annotation

GitHub Actions / validate-links

Unused import

Check warning on line 17 in parsing/src/main/scala-2/org/apache/pekko/http/ccompat/pre213macro.scala

View workflow job for this annotation

GitHub Actions / Compile and test (2.13, 11)

Unused import

Check warning on line 17 in parsing/src/main/scala-2/org/apache/pekko/http/ccompat/pre213macro.scala

View workflow job for this annotation

GitHub Actions / Compile and test (2.13, 8)

Unused import
import scala.reflect.macros.blackbox.Context

object pre213macro {
Expand All @@ -26,7 +26,7 @@
else
method
case _ =>
throw new IllegalArgumentException("Please annotate single expressions")
c.abort(c.enclosingPosition, "Please annotate single expressions")
}
}
class pre213 extends StaticAnnotation {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
package org.apache.pekko.http.ccompat

import scala.annotation.StaticAnnotation
import scala.language.experimental.macros

Check warning on line 17 in parsing/src/main/scala-2/org/apache/pekko/http/ccompat/since213macro.scala

View workflow job for this annotation

GitHub Actions / validate-links

Unused import

Check warning on line 17 in parsing/src/main/scala-2/org/apache/pekko/http/ccompat/since213macro.scala

View workflow job for this annotation

GitHub Actions / Compile and test (2.13, 11)

Unused import

Check warning on line 17 in parsing/src/main/scala-2/org/apache/pekko/http/ccompat/since213macro.scala

View workflow job for this annotation

GitHub Actions / Compile and test (2.13, 8)

Unused import
import scala.reflect.macros.blackbox.Context

object since213macro {
Expand All @@ -26,7 +26,7 @@
else
c.Expr[Nothing](EmptyTree)
case _ =>
throw new IllegalArgumentException("Please annotate single expressions")
c.abort(c.enclosingPosition, "Please annotate single expressions")
}
}
class since213 extends StaticAnnotation {
Expand Down
Loading