Skip to content

Don't force annotation unpickling when testing for SilentIntoAnnot #23506

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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 @@ -668,7 +668,7 @@ class TreeUnpickler(reader: TastyReader,
val annotOwner =
if sym.owner.isClass then newLocalDummy(sym.owner) else sym.owner
var annots = annotFns.map(_(annotOwner))
if annots.exists(_.symbol == defn.SilentIntoAnnot) then
if annots.exists(_.hasSymbol(defn.SilentIntoAnnot)) then
// Temporary measure until we can change TastyFormat to include an INTO tag
sym.setFlag(Into)
annots = annots.filterNot(_.symbol == defn.SilentIntoAnnot)
Expand Down
2 changes: 2 additions & 0 deletions tests/pos/i23496/BaseLineSpec_2.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
package scalaql
import scalaql.fixture.*
3 changes: 3 additions & 0 deletions tests/pos/i23496/Query_1.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package scalaql

import scala.annotation.unchecked.uncheckedVariance // unused
4 changes: 4 additions & 0 deletions tests/pos/i23496/ScalaqlSyntax_1.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package scalaql.syntax

@scalaql.forbiddenInheritance
trait ScalaqlSyntax
3 changes: 3 additions & 0 deletions tests/pos/i23496/annotations_1.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package scalaql

class forbiddenInheritance extends scala.annotation.StaticAnnotation
1 change: 1 addition & 0 deletions tests/pos/i23496/fixture_2.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package scalaql.fixture
3 changes: 3 additions & 0 deletions tests/pos/i23496/package.scala_1.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import scalaql.syntax.ScalaqlSyntax

package object scalaql extends ScalaqlSyntax
Loading