diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala index a7b02a287f6d..9e6f4ec45c7e 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala @@ -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) diff --git a/tests/pos/i23496/BaseLineSpec_2.scala b/tests/pos/i23496/BaseLineSpec_2.scala new file mode 100644 index 000000000000..71e731a11b1b --- /dev/null +++ b/tests/pos/i23496/BaseLineSpec_2.scala @@ -0,0 +1,2 @@ +package scalaql +import scalaql.fixture.* diff --git a/tests/pos/i23496/Query_1.scala b/tests/pos/i23496/Query_1.scala new file mode 100644 index 000000000000..f142e6086328 --- /dev/null +++ b/tests/pos/i23496/Query_1.scala @@ -0,0 +1,3 @@ +package scalaql + +import scala.annotation.unchecked.uncheckedVariance // unused diff --git a/tests/pos/i23496/ScalaqlSyntax_1.scala b/tests/pos/i23496/ScalaqlSyntax_1.scala new file mode 100644 index 000000000000..9fc0fba46030 --- /dev/null +++ b/tests/pos/i23496/ScalaqlSyntax_1.scala @@ -0,0 +1,4 @@ +package scalaql.syntax + +@scalaql.forbiddenInheritance +trait ScalaqlSyntax diff --git a/tests/pos/i23496/annotations_1.scala b/tests/pos/i23496/annotations_1.scala new file mode 100644 index 000000000000..d96737787b51 --- /dev/null +++ b/tests/pos/i23496/annotations_1.scala @@ -0,0 +1,3 @@ +package scalaql + +class forbiddenInheritance extends scala.annotation.StaticAnnotation diff --git a/tests/pos/i23496/fixture_2.scala b/tests/pos/i23496/fixture_2.scala new file mode 100644 index 000000000000..aa564742ec25 --- /dev/null +++ b/tests/pos/i23496/fixture_2.scala @@ -0,0 +1 @@ +package scalaql.fixture diff --git a/tests/pos/i23496/package.scala_1.scala b/tests/pos/i23496/package.scala_1.scala new file mode 100644 index 000000000000..46ada0b9bb94 --- /dev/null +++ b/tests/pos/i23496/package.scala_1.scala @@ -0,0 +1,3 @@ +import scalaql.syntax.ScalaqlSyntax + +package object scalaql extends ScalaqlSyntax