Skip to content

Commit

Permalink
chore: Effectively open Scala 2 source code
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzaremmal committed Feb 11, 2025
1 parent 813c644 commit dce5251
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/src/dotty/tools/dotc/typer/Namer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ class Namer { typer: Typer =>
var flags = checkFlags(tree.mods.flags)
if ctx.settings.YcompileScala2Library.value then
flags |= Scala2x
if flags.isOneOf(EffectivelyOpenFlags, butNot = EffectivelyFinalFlags | Sealed) then
flags |= Open
val name = checkNoConflict(tree.name, flags.is(Private), tree.span).asTypeName
val cls =
createOrRefine[ClassSymbol](tree, name, flags, ctx.owner,
Expand Down

0 comments on commit dce5251

Please sign in to comment.