Skip to content

Commit 786ad3f

Browse files
authored
Update cc test compiler to latest dotc code base (#16382)
2 parents 27f4a94 + 3002842 commit 786ad3f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+903
-752
lines changed

tests/pos-with-compiler-cc/dotc/ast/TreeInfo.scala

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ import scala.collection.mutable
1414

1515
import scala.annotation.tailrec
1616

17-
trait TreeInfo[T >: Untyped <: Type] { self: Trees.Instance[T] =>
18-
19-
// Note: the <: Type constraint looks necessary (and is needed to make the file compile in dotc).
20-
// But Scalac accepts the program happily without it. Need to find out why.
17+
trait TreeInfo[T <: Untyped] { self: Trees.Instance[T] =>
2118

2219
def unsplice(tree: Trees.Tree[T]): Trees.Tree[T] = tree
2320

tests/pos-with-compiler-cc/dotc/ast/Trees.scala

Lines changed: 153 additions & 155 deletions
Large diffs are not rendered by default.

tests/pos-with-compiler-cc/dotc/ast/untpd.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
4444
/** mods object name impl */
4545
case class ModuleDef(name: TermName, impl: Template)(implicit @constructorOnly src: SourceFile)
4646
extends MemberDef {
47-
type ThisTree[-T >: Untyped] <: Trees.NameTree[T] with Trees.MemberDef[T] with ModuleDef
47+
type ThisTree[+T <: Untyped] <: Trees.NameTree[T] with Trees.MemberDef[T] with ModuleDef
4848
def withName(name: Name)(using Context): ModuleDef = cpy.ModuleDef(this)(name.toTermName, impl)
4949
}
5050

tests/pos-with-compiler-cc/dotc/cc/CaptureOps.scala

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -185,24 +185,27 @@ extension (tp: Type)
185185
case _ =>
186186
false
187187

188+
extension (cls: ClassSymbol)
189+
190+
def pureBaseClass(using Context): Option[Symbol] =
191+
cls.baseClasses.find(bc =>
192+
defn.pureBaseClasses.contains(bc)
193+
|| {
194+
val selfType = bc.givenSelfType
195+
selfType.exists && selfType.captureSet.isAlwaysEmpty
196+
})
197+
188198
extension (sym: Symbol)
189199

190200
/** A class is pure if:
191201
* - one its base types has an explicitly declared self type with an empty capture set
192202
* - or it is a value class
193-
* - or it is Nothing or Null
203+
* - or it is an exception
204+
* - or it is one of Nothing, Null, or String
194205
*/
195206
def isPureClass(using Context): Boolean = sym match
196207
case cls: ClassSymbol =>
197-
val AnyValClass = defn.AnyValClass
198-
cls.baseClasses.exists(bc =>
199-
bc == AnyValClass
200-
|| {
201-
val selfType = bc.givenSelfType
202-
selfType.exists && selfType.captureSet.isAlwaysEmpty
203-
})
204-
|| cls == defn.NothingClass
205-
|| cls == defn.NullClass
208+
cls.pureBaseClass.isDefined || defn.pureSimpleClasses.contains(cls)
206209
case _ =>
207210
false
208211

tests/pos-with-compiler-cc/dotc/cc/CaptureSet.scala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,11 +327,6 @@ object CaptureSet:
327327
/** Used as a recursion brake */
328328
@sharable private[dotc] val Pending = Const(SimpleIdentitySet.empty)
329329

330-
/** The empty capture set with a description that says it's the elf type of an
331-
* exception class.
332-
*/
333-
val emptyOfException: CaptureSet.Const = Const(emptySet, "of an exception class")
334-
335330
def apply(elems: CaptureRef*)(using Context): CaptureSet.Const =
336331
if elems.isEmpty then empty
337332
else Const(SimpleIdentitySet(elems.map(_.normalizedRef)*))

tests/pos-with-compiler-cc/dotc/cc/CheckCaptures.scala

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,10 @@ class CheckCaptures extends Recheck, SymTransformer:
517517
for param <- cls.paramGetters do
518518
if !param.hasAnnotation(defn.ConstructorOnlyAnnot) then
519519
checkSubset(param.termRef.captureSet, thisSet, param.srcPos) // (3)
520-
if cls.derivesFrom(defn.ThrowableClass) then
521-
checkSubset(thisSet, CaptureSet.emptyOfException, tree.srcPos)
520+
for pureBase <- cls.pureBaseClass do
521+
checkSubset(thisSet,
522+
CaptureSet.empty.withDescription(i"of pure base class $pureBase"),
523+
tree.srcPos)
522524
super.recheckClassDef(tree, impl, cls)
523525
finally
524526
curEnv = saved
@@ -880,6 +882,7 @@ class CheckCaptures extends Recheck, SymTransformer:
880882
* - Check that externally visible `val`s or `def`s have empty capture sets. If not,
881883
* suggest an explicit type. This is so that separate compilation (where external
882884
* symbols have empty capture sets) gives the same results as joint compilation.
885+
* - Check that arguments of TypeApplys and AppliedTypes conform to their bounds.
883886
*/
884887
def postCheck(unit: tpd.Tree)(using Context): Unit =
885888
unit.foreachSubTree {
@@ -935,7 +938,7 @@ class CheckCaptures extends Recheck, SymTransformer:
935938
case _ =>
936939
}
937940
if !ctx.reporter.errorsReported then
938-
// We dont report errors hre if previous errors were reported, because other
941+
// We dont report errors here if previous errors were reported, because other
939942
// errors often result in bad applied types, but flagging these bad types gives
940943
// often worse error messages than the original errors.
941944
val checkApplied = new TreeTraverser:

tests/pos-with-compiler-cc/dotc/config/Feature.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@ object Feature:
110110
case Some(v) => v
111111
case none => sourceVersionSetting
112112

113-
def migrateTo3(using Context): Boolean = sourceVersion == `3.0-migration`
113+
def migrateTo3(using Context): Boolean =
114+
sourceVersion == `3.0-migration`
115+
116+
def fewerBracesEnabled(using Context) =
117+
sourceVersion.isAtLeast(`3.3`) || enabled(fewerBraces)
114118

115119
/** If current source migrates to `version`, issue given warning message
116120
* and return `true`, otherwise return `false`.

tests/pos-with-compiler-cc/dotc/config/ScalaSettings.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ trait AllScalaSettings extends CommonScalaSettings, PluginSettings, VerboseSetti
6464
val oldSyntax: Setting[Boolean] = BooleanSetting("-old-syntax", "Require `(...)` around conditions.")
6565
val indent: Setting[Boolean] = BooleanSetting("-indent", "Together with -rewrite, remove {...} syntax when possible due to significant indentation.")
6666
val noindent: Setting[Boolean] = BooleanSetting("-no-indent", "Require classical {...} syntax, indentation is not significant.", aliases = List("-noindent"))
67-
val YindentColons: Setting[Boolean] = BooleanSetting("-Yindent-colons", "(disabled: use -language:experimental.fewerBraces instead)")
6867

6968
/* Decompiler settings */
7069
val printTasty: Setting[Boolean] = BooleanSetting("-print-tasty", "Prints the raw tasty.", aliases = List("--print-tasty"))

tests/pos-with-compiler-cc/dotc/config/SourceVersion.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import util.Property
88
enum SourceVersion:
99
case `3.0-migration`, `3.0`, `3.1` // Note: do not add `3.1-migration` here, 3.1 is the same language as 3.0.
1010
case `3.2-migration`, `3.2`
11+
case `3.3-migration`, `3.3`
1112
case `future-migration`, `future`
1213

1314
val isMigrating: Boolean = toString.endsWith("-migration")
@@ -18,7 +19,7 @@ enum SourceVersion:
1819
def isAtLeast(v: SourceVersion) = stable.ordinal >= v.ordinal
1920

2021
object SourceVersion extends Property.Key[SourceVersion]:
21-
def defaultSourceVersion = `3.2`
22+
def defaultSourceVersion = `3.3`
2223

2324
/** language versions that may appear in a language import, are deprecated, but not removed from the standard library. */
2425
val illegalSourceVersionNames = List("3.1-migration").map(_.toTermName)

tests/pos-with-compiler-cc/dotc/core/ConstraintHandling.scala

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,13 @@ trait ConstraintHandling {
556556
inst
557557
end approximation
558558

559+
private def isTransparent(tp: Type, traitOnly: Boolean)(using Context): Boolean = tp match
560+
case AndType(tp1, tp2) =>
561+
isTransparent(tp1, traitOnly) && isTransparent(tp2, traitOnly)
562+
case _ =>
563+
val cls = tp.underlyingClassRef(refinementOK = false).typeSymbol
564+
cls.isTransparentClass && (!traitOnly || cls.is(Trait))
565+
559566
/** If `tp` is an intersection such that some operands are transparent trait instances
560567
* and others are not, replace as many transparent trait instances as possible with Any
561568
* as long as the result is still a subtype of `bound`. But fall back to the
@@ -568,18 +575,17 @@ trait ConstraintHandling {
568575
var dropped: List[Type] = List() // the types dropped so far, last one on top
569576

570577
def dropOneTransparentTrait(tp: Type): Type =
571-
val tpd = tp.dealias
572-
if tpd.typeSymbol.isTransparentTrait && !tpd.isLambdaSub && !kept.contains(tpd) then
573-
dropped = tpd :: dropped
578+
if isTransparent(tp, traitOnly = true) && !kept.contains(tp) then
579+
dropped = tp :: dropped
574580
defn.AnyType
575-
else tpd match
581+
else tp match
576582
case AndType(tp1, tp2) =>
577583
val tp1w = dropOneTransparentTrait(tp1)
578584
if tp1w ne tp1 then tp1w & tp2
579585
else
580586
val tp2w = dropOneTransparentTrait(tp2)
581587
if tp2w ne tp2 then tp1 & tp2w
582-
else tpd
588+
else tp
583589
case _ =>
584590
tp
585591

@@ -654,7 +660,16 @@ trait ConstraintHandling {
654660

655661
val wideInst =
656662
if isSingleton(bound) then inst
657-
else dropTransparentTraits(widenIrreducible(widenOr(widenSingle(inst))), bound)
663+
else
664+
val widenedFromSingle = widenSingle(inst)
665+
val widenedFromUnion = widenOr(widenedFromSingle)
666+
val widened =
667+
if (widenedFromUnion ne widenedFromSingle) && isTransparent(widenedFromUnion, traitOnly = false) then
668+
widenedFromSingle
669+
else
670+
dropTransparentTraits(widenedFromUnion, bound)
671+
widenIrreducible(widened)
672+
658673
wideInst match
659674
case wideInst: TypeRef if wideInst.symbol.is(Module) =>
660675
TermRef(wideInst.prefix, wideInst.symbol.sourceModule)

tests/pos-with-compiler-cc/dotc/core/Contexts.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ object Contexts {
157157
final def owner: Symbol = _owner
158158

159159
/** The current tree */
160-
private var _tree: Tree[? >: Untyped]= _
161-
protected def tree_=(tree: Tree[? >: Untyped]): Unit = _tree = tree
162-
final def tree: Tree[? >: Untyped] = _tree
160+
private var _tree: Tree[?]= _
161+
protected def tree_=(tree: Tree[?]): Unit = _tree = tree
162+
final def tree: Tree[?] = _tree
163163

164164
/** The current scope */
165165
private var _scope: Scope = _
@@ -470,7 +470,7 @@ object Contexts {
470470
}
471471

472472
/** The context of expression `expr` seen as a member of a statement sequence */
473-
def exprContext(stat: Tree[? >: Untyped], exprOwner: Symbol): Context =
473+
def exprContext(stat: Tree[?], exprOwner: Symbol): Context =
474474
if (exprOwner == this.owner) this
475475
else if (untpd.isSuperConstrCall(stat) && this.owner.isClass) superCallContext
476476
else fresh.setOwner(exprOwner)
@@ -593,7 +593,7 @@ object Contexts {
593593
assert(owner != NoSymbol)
594594
this.owner = owner
595595
this
596-
def setTree(tree: Tree[? >: Untyped]): this.type =
596+
def setTree(tree: Tree[?]): this.type =
597597
util.Stats.record("Context.setTree")
598598
this.tree = tree
599599
this

tests/pos-with-compiler-cc/dotc/core/Decorators.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,9 @@ object Decorators {
275275
s"[cannot display due to $msg, raw string = $x]"
276276
case _ => String.valueOf(x).nn
277277

278+
/** Returns the simple class name of `x`. */
279+
def className: String = getClass.getSimpleName.nn
280+
278281
extension [T](x: T)
279282
def assertingErrorsReported(using Context): T = {
280283
assert(ctx.reporter.errorsReported)

tests/pos-with-compiler-cc/dotc/core/Definitions.scala

Lines changed: 56 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,6 @@ class Definitions {
970970

971971
// Annotation base classes
972972
@tu lazy val AnnotationClass: ClassSymbol = requiredClass("scala.annotation.Annotation")
973-
@tu lazy val ClassfileAnnotationClass: ClassSymbol = requiredClass("scala.annotation.ClassfileAnnotation")
974973
@tu lazy val StaticAnnotationClass: ClassSymbol = requiredClass("scala.annotation.StaticAnnotation")
975974
@tu lazy val RefiningAnnotationClass: ClassSymbol = requiredClass("scala.annotation.RefiningAnnotation")
976975

@@ -1350,6 +1349,15 @@ class Definitions {
13501349

13511350
@tu lazy val untestableClasses: Set[Symbol] = Set(NothingClass, NullClass, SingletonClass)
13521351

1352+
/** Base classes that are assumed to be pure for the purposes of capture checking.
1353+
* Every class inheriting from a pure baseclass is pure.
1354+
*/
1355+
@tu lazy val pureBaseClasses = Set(defn.AnyValClass, defn.ThrowableClass)
1356+
1357+
/** Non-inheritable lasses that are assumed to be pure for the purposes of capture checking,
1358+
*/
1359+
@tu lazy val pureSimpleClasses = Set(StringClass, NothingClass, NullClass)
1360+
13531361
@tu lazy val AbstractFunctionType: Array[TypeRef] = mkArityArray("scala.runtime.AbstractFunction", MaxImplementedFunctionArity, 0).asInstanceOf[Array[TypeRef]]
13541362
val AbstractFunctionClassPerRun: PerRun[Array[Symbol]] = new PerRun(AbstractFunctionType.map(_.symbol.asClass))
13551363
def AbstractFunctionClass(n: Int)(using Context): Symbol = AbstractFunctionClassPerRun()(using ctx)(n)
@@ -1830,20 +1838,53 @@ class Definitions {
18301838
def isInfix(sym: Symbol)(using Context): Boolean =
18311839
(sym eq Object_eq) || (sym eq Object_ne)
18321840

1833-
@tu lazy val assumedTransparentTraits =
1834-
Set[Symbol](ComparableClass, ProductClass, SerializableClass,
1835-
// add these for now, until we had a chance to retrofit 2.13 stdlib
1836-
// we should do a more through sweep through it then.
1837-
requiredClass("scala.collection.SortedOps"),
1838-
requiredClass("scala.collection.StrictOptimizedSortedSetOps"),
1839-
requiredClass("scala.collection.generic.DefaultSerializable"),
1840-
requiredClass("scala.collection.generic.IsIterable"),
1841-
requiredClass("scala.collection.generic.IsIterableOnce"),
1842-
requiredClass("scala.collection.generic.IsMap"),
1843-
requiredClass("scala.collection.generic.IsSeq"),
1844-
requiredClass("scala.collection.generic.Subtractable"),
1845-
requiredClass("scala.collection.immutable.StrictOptimizedSeqOps")
1846-
)
1841+
@tu lazy val assumedTransparentNames: Map[Name, Set[Symbol]] =
1842+
// add these for now, until we had a chance to retrofit 2.13 stdlib
1843+
// we should do a more through sweep through it then.
1844+
val strs = Map(
1845+
"Any" -> Set("scala"),
1846+
"AnyVal" -> Set("scala"),
1847+
"Matchable" -> Set("scala"),
1848+
"Product" -> Set("scala"),
1849+
"Object" -> Set("java.lang"),
1850+
"Comparable" -> Set("java.lang"),
1851+
"Serializable" -> Set("java.io"),
1852+
"BitSetOps" -> Set("scala.collection"),
1853+
"IndexedSeqOps" -> Set("scala.collection", "scala.collection.mutable", "scala.collection.immutable"),
1854+
"IterableOnceOps" -> Set("scala.collection"),
1855+
"IterableOps" -> Set("scala.collection"),
1856+
"LinearSeqOps" -> Set("scala.collection", "scala.collection.immutable"),
1857+
"MapOps" -> Set("scala.collection", "scala.collection.mutable", "scala.collection.immutable"),
1858+
"SeqOps" -> Set("scala.collection", "scala.collection.mutable", "scala.collection.immutable"),
1859+
"SetOps" -> Set("scala.collection", "scala.collection.mutable", "scala.collection.immutable"),
1860+
"SortedMapOps" -> Set("scala.collection", "scala.collection.mutable", "scala.collection.immutable"),
1861+
"SortedOps" -> Set("scala.collection"),
1862+
"SortedSetOps" -> Set("scala.collection", "scala.collection.mutable", "scala.collection.immutable"),
1863+
"StrictOptimizedIterableOps" -> Set("scala.collection"),
1864+
"StrictOptimizedLinearSeqOps" -> Set("scala.collection"),
1865+
"StrictOptimizedMapOps" -> Set("scala.collection", "scala.collection.immutable"),
1866+
"StrictOptimizedSeqOps" -> Set("scala.collection", "scala.collection.immutable"),
1867+
"StrictOptimizedSetOps" -> Set("scala.collection", "scala.collection.immutable"),
1868+
"StrictOptimizedSortedMapOps" -> Set("scala.collection", "scala.collection.immutable"),
1869+
"StrictOptimizedSortedSetOps" -> Set("scala.collection", "scala.collection.immutable"),
1870+
"ArrayDequeOps" -> Set("scala.collection.mutable"),
1871+
"DefaultSerializable" -> Set("scala.collection.generic"),
1872+
"IsIterable" -> Set("scala.collection.generic"),
1873+
"IsIterableLowPriority" -> Set("scala.collection.generic"),
1874+
"IsIterableOnce" -> Set("scala.collection.generic"),
1875+
"IsIterableOnceLowPriority" -> Set("scala.collection.generic"),
1876+
"IsMap" -> Set("scala.collection.generic"),
1877+
"IsSeq" -> Set("scala.collection.generic"))
1878+
strs.map { case (simple, pkgs) => (
1879+
simple.toTypeName,
1880+
pkgs.map(pkg => staticRef(pkg.toTermName, isPackage = true).symbol.moduleClass)
1881+
)
1882+
}
1883+
1884+
def isAssumedTransparent(sym: Symbol): Boolean =
1885+
assumedTransparentNames.get(sym.name) match
1886+
case Some(pkgs) => pkgs.contains(sym.owner)
1887+
case none => false
18471888

18481889
// ----- primitive value class machinery ------------------------------------------
18491890

tests/pos-with-compiler-cc/dotc/core/Flags.scala

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -350,14 +350,14 @@ object Flags {
350350
/** Symbol is a method which should be marked ACC_SYNCHRONIZED */
351351
val (_, Synchronized @ _, _) = newFlags(36, "<synchronized>")
352352

353-
/** Symbol is a Java-style varargs method */
354-
val (_, JavaVarargs @ _, _) = newFlags(37, "<varargs>")
353+
/** Symbol is a Java-style varargs method / a Java annotation */
354+
val (_, JavaVarargs @ _, JavaAnnotation @ _) = newFlags(37, "<varargs>", "<java-annotation>")
355355

356356
/** Symbol is a Java default method */
357357
val (_, DefaultMethod @ _, _) = newFlags(38, "<defaultmethod>")
358358

359359
/** Symbol is a transparent inline method or trait */
360-
val (Transparent @ _, _, _) = newFlags(39, "transparent")
360+
val (Transparent @ _, _, TransparentType @ _) = newFlags(39, "transparent")
361361

362362
/** Symbol is an enum class or enum case (if used with case) */
363363
val (Enum @ _, EnumVal @ _, _) = newFlags(40, "enum")
@@ -477,7 +477,7 @@ object Flags {
477477
*/
478478
val AfterLoadFlags: FlagSet = commonFlags(
479479
FromStartFlags, AccessFlags, Final, AccessorOrSealed,
480-
Abstract, LazyOrTrait, SelfName, JavaDefined, Transparent)
480+
Abstract, LazyOrTrait, SelfName, JavaDefined, JavaAnnotation, Transparent)
481481

482482
/** A value that's unstable unless complemented with a Stable flag */
483483
val UnstableValueFlags: FlagSet = Mutable | Method
@@ -609,5 +609,4 @@ object Flags {
609609
val SyntheticParam: FlagSet = Synthetic | Param
610610
val SyntheticTermParam: FlagSet = Synthetic | TermParam
611611
val SyntheticTypeParam: FlagSet = Synthetic | TypeParam
612-
val TransparentTrait: FlagSet = Trait | Transparent
613612
}

tests/pos-with-compiler-cc/dotc/core/Scopes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ object Scopes {
467467
override def size: Int = 0
468468
override def nestingLevel: Int = 0
469469
override def toList(using Context): List[Symbol] = Nil
470-
override def cloneScope(using Context): MutableScope = unsupported("cloneScope")
470+
override def cloneScope(using Context): MutableScope = newScope(nestingLevel)
471471
override def lookupEntry(name: Name)(using Context): ScopeEntry | Null = null
472472
override def lookupNextEntry(entry: ScopeEntry)(using Context): ScopeEntry | Null = null
473473
}

tests/pos-with-compiler-cc/dotc/core/StdNames.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,6 @@ object StdNames {
243243
final val ToString: N = "ToString"
244244
final val Xor: N = "^"
245245

246-
final val ClassfileAnnotation: N = "ClassfileAnnotation"
247246
final val ClassManifest: N = "ClassManifest"
248247
final val Enum: N = "Enum"
249248
final val Group: N = "Group"

tests/pos-with-compiler-cc/dotc/core/SymDenotations.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ object SymDenotations {
809809

810810
/** Is this a Scala or Java annotation ? */
811811
def isAnnotation(using Context): Boolean =
812-
isClass && derivesFrom(defn.AnnotationClass)
812+
isClass && (derivesFrom(defn.AnnotationClass) || is(JavaAnnotation))
813813

814814
/** Is this symbol a class that extends `java.io.Serializable` ? */
815815
def isSerializable(using Context): Boolean =
@@ -1152,9 +1152,9 @@ object SymDenotations {
11521152
final def isEffectivelySealed(using Context): Boolean =
11531153
isOneOf(FinalOrSealed) || isClass && !isOneOf(EffectivelyOpenFlags)
11541154

1155-
final def isTransparentTrait(using Context): Boolean =
1156-
isAllOf(TransparentTrait)
1157-
|| defn.assumedTransparentTraits.contains(symbol)
1155+
final def isTransparentClass(using Context): Boolean =
1156+
is(TransparentType)
1157+
|| defn.isAssumedTransparent(symbol)
11581158
|| isClass && hasAnnotation(defn.TransparentTraitAnnot)
11591159

11601160
/** The class containing this denotation which has the given effective name. */

0 commit comments

Comments
 (0)