Skip to content

Commit 663d334

Browse files
authored
Merge pull request #10658 from dotty-staging/fix-#10648
Fix #10648: Fixes of syntax documentation
2 parents ab5db76 + 3b45151 commit 663d334

Some content is hidden

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

59 files changed

+734
-308
lines changed

community-build/src/scala/dotty/communitybuild/Fields.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ import scala.quoted.Type
55
class FieldsDsl[V](v: V):
66
inline def of[T]: Seq[T] = FieldsImpl.fieldsOfType[V, T](v)
77

8-
extension [V](on: V):
8+
extension [V](on: V)
99
def reflectedFields = FieldsDsl(on)

compiler/src/dotty/tools/backend/jvm/BTypesFromSymbols.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ class BTypesFromSymbols[I <: DottyBackendInterface](val int: I) extends BTypes {
275275
* object T { def f { object U } }
276276
* the owner of U is T, so UModuleClass.isStatic is true. Phase travel does not help here.
277277
*/
278-
extension (sym: Symbol):
278+
extension (sym: Symbol)
279279
private def isOriginallyStaticOwner: Boolean =
280280
sym.is(PackageClass) || sym.is(ModuleClass) && sym.originalOwner.originalLexicallyEnclosingClass.isOriginallyStaticOwner
281281

compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ object DottyBackendInterface {
125125
}
126126

127127
given symExtensions: AnyRef with
128-
extension (sym: Symbol):
128+
extension (sym: Symbol)
129129

130130
def isInterface(using Context): Boolean = (sym.is(PureInterface)) || sym.is(Trait)
131131

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
11481148
!(sym.is(Method) && sym.info.isInstanceOf[MethodOrPoly]) // if is a method it is parameterless
11491149
}
11501150

1151-
extension (xs: List[tpd.Tree]):
1151+
extension (xs: List[tpd.Tree])
11521152
def tpes: List[Type] = xs match {
11531153
case x :: xs1 => x.tpe :: xs1.tpes
11541154
case nil => Nil

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import ast.untpd
99
/** Extension methods for contexts where we want to keep the ctx.<methodName> syntax */
1010
object ContextOps:
1111

12-
extension (ctx: Context):
12+
extension (ctx: Context)
1313

1414
/** Enter symbol into current class, if current class is owner of current context,
1515
* or into current scope, if not. Should always be called instead of scope.enter

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ object Contexts {
650650
}
651651

652652
given ops: AnyRef with
653-
extension (c: Context):
653+
extension (c: Context)
654654
def addNotNullInfo(info: NotNullInfo) =
655655
c.withNotNullInfos(c.notNullInfos.extendWith(info))
656656

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ object Decorators {
2828
case s: String => typeName(s)
2929
case n: Name => n.toTypeName
3030

31-
extension (s: String):
31+
extension (s: String)
3232
def splitWhere(f: Char => Boolean, doDropIndex: Boolean): Option[(String, String)] =
3333
def splitAt(idx: Int, doDropIndex: Boolean): Option[(String, String)] =
3434
if (idx == -1) None
@@ -61,7 +61,7 @@ object Decorators {
6161
/** Implements a findSymbol method on iterators of Symbols that
6262
* works like find but avoids Option, replacing None with NoSymbol.
6363
*/
64-
extension (it: Iterator[Symbol]):
64+
extension (it: Iterator[Symbol])
6565
final def findSymbol(p: Symbol => Boolean): Symbol = {
6666
while (it.hasNext) {
6767
val sym = it.next()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2571,7 +2571,7 @@ object TypeComparer {
25712571
*/
25722572
val Fresh: Repr = 4
25732573

2574-
extension (approx: Repr):
2574+
extension (approx: Repr)
25752575
def low: Boolean = (approx & LoApprox) != 0
25762576
def high: Boolean = (approx & HiApprox) != 0
25772577
def addLow: Repr = approx | LoApprox

compiler/src/dotty/tools/dotc/interactive/Completion.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ object Completion {
241241
}
242242
}
243243

244-
// There are four possible ways for an extension method to be applicable:
244+
// There are four possible ways for an extension method to be applicable
245245

246246
// 1. The extension method is visible under a simple name, by being defined or inherited or imported in a scope enclosing the reference.
247247
val extMethodsInScope =

0 commit comments

Comments
 (0)