Skip to content

Commit d67b5cf

Browse files
authored
Merge pull request #8289 from dotty-staging/change-given-import
Drop outdated syntax for given import selectors
2 parents 5b006fb + da645f3 commit d67b5cf

File tree

72 files changed

+174
-187
lines changed

Some content is hidden

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

72 files changed

+174
-187
lines changed
Submodule intent updated 38 files

compiler/src/dotty/tools/dotc/ast/TreeInfo.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
868868
/** Extractor for not-null assertions.
869869
* A not-null assertion for reference `x` has the form `x.$asInstanceOf$[x.type & T]`.
870870
*/
871-
object AssertNotNull with
871+
object AssertNotNull :
872872
def apply(tree: tpd.Tree, tpnn: Type)(using Context): tpd.Tree =
873873
tree.select(defn.Any_typeCast).appliedToType(AndType(tree.tpe, tpnn))
874874

compiler/src/dotty/tools/dotc/core/Contexts.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import ast.untpd
1616
import Flags.GivenOrImplicit
1717
import util.{NoSource, SimpleIdentityMap, SourceFile}
1818
import typer.{Implicits, ImportInfo, Inliner, NamerContextOps, SearchHistory, SearchRoot, TypeAssigner, Typer, Nullables}
19-
import Nullables.{NotNullInfo, given}
19+
import Nullables.{NotNullInfo, given _}
2020
import Implicits.ContextualImplicits
2121
import config.Settings._
2222
import config.Config
@@ -599,7 +599,7 @@ object Contexts {
599599
def setDebug: this.type = setSetting(base.settings.Ydebug, true)
600600
}
601601

602-
extension ops on (c: Context) with
602+
extension ops on (c: Context):
603603
def addNotNullInfo(info: NotNullInfo) =
604604
c.withNotNullInfos(c.notNullInfos.extendWith(info))
605605

0 commit comments

Comments
 (0)