diff --git a/.github/PULL_REQUEST_TEMPLATE/fix-issue.md b/.github/PULL_REQUEST_TEMPLATE/fix-issue.md index 506996510c7e..f7cf22eb59c7 100644 --- a/.github/PULL_REQUEST_TEMPLATE/fix-issue.md +++ b/.github/PULL_REQUEST_TEMPLATE/fix-issue.md @@ -6,14 +6,14 @@ assignees: '' --- - ## Fix #XYZ - + diff --git a/.github/PULL_REQUEST_TEMPLATE/other-pr.md b/.github/PULL_REQUEST_TEMPLATE/other-pr.md index 4b69a80460af..fad49836df92 100644 --- a/.github/PULL_REQUEST_TEMPLATE/other-pr.md +++ b/.github/PULL_REQUEST_TEMPLATE/other-pr.md @@ -6,14 +6,14 @@ assignees: '' --- - ## Description - + diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index 7415759078ac..ba4bae0456d0 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -13,9 +13,9 @@ jobs: options: --cpu-shares 4096 env: - SDKMAN_KEY: ${{ secrets.SDKMAN_KEY }} + SDKMAN_KEY: ${{ secrets.SDKMAN_KEY }} SDKMAN_TOKEN: ${{ secrets.SDKMAN_TOKEN }} - + steps: - name: Reset existing repo run: git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true diff --git a/.github/workflows/scripts/publish-sdkman.sh b/.github/workflows/scripts/publish-sdkman.sh index 07d35a72a65e..70987bff175b 100755 --- a/.github/workflows/scripts/publish-sdkman.sh +++ b/.github/workflows/scripts/publish-sdkman.sh @@ -9,11 +9,11 @@ set -u -# latest stable dotty version +# latest stable dotty version DOTTY_VERSION=$(curl -s https://api.github.com/repos/lampepfl/dotty/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') DOTTY_URL="https://github.com/lampepfl/dotty/releases/download/$DOTTY_VERSION/scala3-$DOTTY_VERSION.zip" -# checking if dotty version is available +# checking if dotty version is available if ! curl --output /dev/null --silent --head --fail "$DOTTY_URL"; then echo "URL doesn't exist: $DOTTY_URL" exit 1 diff --git a/bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccess.scala b/bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccess.scala index a2aaf3e88570..d413458d0049 100644 --- a/bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccess.scala +++ b/bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccess.scala @@ -18,7 +18,7 @@ class InitializedAccess { @Setup def prepare: Unit = { - holder = new LazyHolder + holder = new LazyHolder holder.value } diff --git a/bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccessAny.scala b/bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccessAny.scala index 5a6b4ae1686d..8c75f6bb11a2 100644 --- a/bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccessAny.scala +++ b/bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccessAny.scala @@ -18,7 +18,7 @@ class InitializedAccessAny { @Setup def prepare: Unit = { - holder = new LazyAnyHolder + holder = new LazyAnyHolder holder.value } diff --git a/bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccessGeneric.scala b/bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccessGeneric.scala index a95cb1de2980..a9fecae6281e 100644 --- a/bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccessGeneric.scala +++ b/bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccessGeneric.scala @@ -18,7 +18,7 @@ class InitializedAccessGeneric { @Setup def prepare: Unit = { - holder = new LazyGenericHolder[String]("foo") + holder = new LazyGenericHolder[String]("foo") holder.value } diff --git a/bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccessString.scala b/bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccessString.scala index 25cc0f9b288d..e6c6cd5eb2e3 100644 --- a/bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccessString.scala +++ b/bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccessString.scala @@ -18,7 +18,7 @@ class InitializedAccessString { @Setup def prepare: Unit = { - holder = new LazyStringHolder + holder = new LazyStringHolder holder.value } diff --git a/bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/LazyVals.scala b/bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/LazyVals.scala index 68379f9e142c..26ebb7b9d356 100644 --- a/bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/LazyVals.scala +++ b/bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/LazyVals.scala @@ -21,7 +21,7 @@ object LazyVals { } } } - + class LazyHolder { lazy val value: List[Int] = { diff --git a/compiler/src/dotty/tools/dotc/Compiler.scala b/compiler/src/dotty/tools/dotc/Compiler.scala index b03953afb37c..db3d42d32190 100644 --- a/compiler/src/dotty/tools/dotc/Compiler.scala +++ b/compiler/src/dotty/tools/dotc/Compiler.scala @@ -89,7 +89,7 @@ class Compiler { new ExplicitOuter, // Add accessors to outer classes from nested ones. new ExplicitSelf, // Make references to non-trivial self types explicit as casts new StringInterpolatorOpt, // Optimizes raw and s and f string interpolators by rewriting them to string concatenations or formats - new DropBreaks) :: // Optimize local Break throws by rewriting them + new DropBreaks) :: // Optimize local Break throws by rewriting them List(new PruneErasedDefs, // Drop erased definitions from scopes and simplify erased expressions new UninitializedDefs, // Replaces `compiletime.uninitialized` by `_` new InlinePatterns, // Remove placeholders of inlined patterns diff --git a/compiler/src/dotty/tools/dotc/cc/Setup.scala b/compiler/src/dotty/tools/dotc/cc/Setup.scala index 5642ea99de1a..fc16422e1373 100644 --- a/compiler/src/dotty/tools/dotc/cc/Setup.scala +++ b/compiler/src/dotty/tools/dotc/cc/Setup.scala @@ -262,7 +262,7 @@ extends tpd.TreeTraverser: // hard-coded expansion since $throws aliases in stdlib are defined with `?=>` rather than `?->` defn.FunctionOf( AnnotatedType( - defn.CanThrowClass.typeRef.appliedTo(exc), + defn.CanThrowClass.typeRef.appliedTo(exc), Annotation(defn.ErasedParamAnnot, defn.CanThrowClass.span)) :: Nil, res, isContextual = true diff --git a/compiler/src/dotty/tools/dotc/core/Annotations.scala b/compiler/src/dotty/tools/dotc/core/Annotations.scala index 3b00f2915f1c..202f3eb26e41 100644 --- a/compiler/src/dotty/tools/dotc/core/Annotations.scala +++ b/compiler/src/dotty/tools/dotc/core/Annotations.scala @@ -194,7 +194,7 @@ object Annotations { object Annotation { def apply(tree: Tree): ConcreteAnnotation = ConcreteAnnotation(tree) - + def apply(cls: ClassSymbol, span: Span)(using Context): Annotation = apply(cls, Nil, span) @@ -206,7 +206,7 @@ object Annotations { def apply(atp: Type, arg: Tree, span: Span)(using Context): Annotation = apply(atp, arg :: Nil, span) - + def apply(atp: Type, args: List[Tree], span: Span)(using Context): Annotation = apply(New(atp, args).withSpan(span)) diff --git a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala index d1b0c6cba097..15a639743c15 100644 --- a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala +++ b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala @@ -3129,8 +3129,8 @@ object Parsers { /* -------- PARAMETERS ------------------------------------------- */ /** DefParamClauses ::= DefParamClause { DefParamClause } -- and two DefTypeParamClause cannot be adjacent - * DefParamClause ::= DefTypeParamClause - * | DefTermParamClause + * DefParamClause ::= DefTypeParamClause + * | DefTermParamClause * | UsingParamClause */ def typeOrTermParamClauses( @@ -3228,7 +3228,7 @@ object Parsers { * UsingClsTermParamClause::= ‘(’ ‘using’ [‘erased’] (ClsParams | ContextTypes) ‘)’ * ClsParams ::= ClsParam {‘,’ ClsParam} * ClsParam ::= {Annotation} - * + * * TypelessClause ::= DefTermParamClause * | UsingParamClause * @@ -3616,13 +3616,13 @@ object Parsers { } } - + /** DefDef ::= DefSig [‘:’ Type] ‘=’ Expr * | this TypelessClauses [DefImplicitClause] `=' ConstrExpr * DefDcl ::= DefSig `:' Type * DefSig ::= id [DefTypeParamClause] DefTermParamClauses - * + * * if clauseInterleaving is enabled: * DefSig ::= id [DefParamClauses] [DefImplicitClause] */ @@ -3661,8 +3661,8 @@ object Parsers { val mods1 = addFlag(mods, Method) val ident = termIdent() var name = ident.name.asTermName - val paramss = - if in.featureEnabled(Feature.clauseInterleaving) then + val paramss = + if in.featureEnabled(Feature.clauseInterleaving) then // If you are making interleaving stable manually, please refer to the PR introducing it instead, section "How to make non-experimental" typeOrTermParamClauses(ParamOwner.Def, numLeadParams = numLeadParams) else @@ -3672,7 +3672,7 @@ object Parsers { joinParams(tparams, vparamss) var tpt = fromWithinReturnType { typedOpt() } - + if (migrateTo3) newLineOptWhenFollowedBy(LBRACE) val rhs = if in.token == EQUALS then diff --git a/compiler/src/dotty/tools/dotc/transform/LazyVals.scala b/compiler/src/dotty/tools/dotc/transform/LazyVals.scala index e4cb21a279d6..b433e37e39c0 100644 --- a/compiler/src/dotty/tools/dotc/transform/LazyVals.scala +++ b/compiler/src/dotty/tools/dotc/transform/LazyVals.scala @@ -283,7 +283,7 @@ class LazyVals extends MiniPhase with IdentityDenotTransformer { * * ``` * private @volatile var _x: AnyRef = null - * + * * def x: A = * val result = _x * if result.isInstanceOf[A] then @@ -292,7 +292,7 @@ class LazyVals extends MiniPhase with IdentityDenotTransformer { * null // possible unboxing applied here * else * x_compute() // possible unboxing applied here - * + * * private def x_compute(): AnyRef = * while do * val current: AnyRef = _x diff --git a/compiler/src/dotty/tools/dotc/util/lrutest.sc b/compiler/src/dotty/tools/dotc/util/lrutest.sc index 6e6328b248e3..9c811a65a70a 100644 --- a/compiler/src/dotty/tools/dotc/util/lrutest.sc +++ b/compiler/src/dotty/tools/dotc/util/lrutest.sc @@ -15,12 +15,12 @@ object lrutest { cache.last //> res4: Int = 6 cache lookup "hi" //> res5: String = x cache.indices.take(10).toList //> res6: List[Int] = List(7, 0, 1, 2, 3, 4, 5, 6, 7, 0) - + for (i <- 1 to 10) { if (cache.lookup(i.toString) == null) cache.enter(i.toString, i.toString) } - + cache.indices.take(10).toList //> res7: List[Int] = List(5, 6, 7, 0, 1, 2, 3, 4, 5, 6) cache //> res8: dotty.tools.dotc.util.LRUCache[String,String] = LRUCache(10 -> 10, 9 - //| > 9, 8 -> 8, 7 -> 7, 6 -> 6, 5 -> 5, 4 -> 4, 3 -> 3) @@ -35,6 +35,6 @@ object lrutest { //| > 10, 7 -> 7, 9 -> 9, 8 -> 8, 6 -> 6, 4 -> 4, 3 -> 3) cache.lookup("11") //> res16: String = null cache.enter("11", "!!") - cache //> res17: dotty.tools.dotc.util.LRUCache[String,String] = LRUCache(11 -> !!, 5 + cache //> res17: dotty.tools.dotc.util.LRUCache[String,String] = LRUCache(11 -> !!, 5 //| -> 5, 10 -> 10, 7 -> 7, 9 -> 9, 8 -> 8, 6 -> 6, 4 -> 4) } \ No newline at end of file diff --git a/compiler/src/dotty/tools/io/JDK9Reflectors.java b/compiler/src/dotty/tools/io/JDK9Reflectors.java index 1b0ce5deabab..9816cc03f92a 100644 --- a/compiler/src/dotty/tools/io/JDK9Reflectors.java +++ b/compiler/src/dotty/tools/io/JDK9Reflectors.java @@ -32,7 +32,7 @@ public final class JDK9Reflectors { } // Classes from java.lang.Runtime are not available in JDK 8 so using them explicitly would prevent this file from compiling with JDK 8 - // but these methods are not called in runtime when using this version of JDK + // but these methods are not called in runtime when using this version of JDK public static /*java.lang.Runtime.Version*/ Object runtimeVersionParse(String string) { try { diff --git a/compiler/src/dotty/tools/runner/ScalaClassLoader.scala b/compiler/src/dotty/tools/runner/ScalaClassLoader.scala index 3c8c51d8d6b2..9ec0199abcbb 100644 --- a/compiler/src/dotty/tools/runner/ScalaClassLoader.scala +++ b/compiler/src/dotty/tools/runner/ScalaClassLoader.scala @@ -67,7 +67,7 @@ object ScalaClassLoader { @sharable private[this] val bootClassLoader: ClassLoader = if scala.util.Properties.isJavaAtLeast("9") then try - ClassLoader.getSystemClassLoader.getParent + ClassLoader.getSystemClassLoader.getParent catch case _: Throwable => null else null diff --git a/compiler/test/worksheets/baseTypetest.sc b/compiler/test/worksheets/baseTypetest.sc index 001f1e3b3eaa..4dbd68a6fdc7 100644 --- a/compiler/test/worksheets/baseTypetest.sc +++ b/compiler/test/worksheets/baseTypetest.sc @@ -22,5 +22,5 @@ object baseTypetest extends DottyTest { defn.StringClass isSubClass defn.NullClass //> res4: Boolean = false defn.StringClass.typeRef.baseType(defn.NullClass) //> res5: dotty.tools.dotc.core.Types.Type = NoType - + } \ No newline at end of file diff --git a/compiler/test/worksheets/denotTest.sc b/compiler/test/worksheets/denotTest.sc index 222a347b6947..aa3fb383bd6f 100644 --- a/compiler/test/worksheets/denotTest.sc +++ b/compiler/test/worksheets/denotTest.sc @@ -7,7 +7,7 @@ import Types._, Symbols._ object denotTest extends DottyTest { println("Welcome to the Scala worksheet") //> Welcome to the Scala worksheet - + val str = defn.StringClass.typeRef //> str : dotty.tools.dotc.core.Types.TypeRef = TypeRef(ThisType(module class l //| ang#57),String) val d= str.member("getBytes".toTermName) //> d : dotty.tools.dotc.core.Denotations.Denotation = val getBytes val g @@ -47,7 +47,7 @@ object denotTest extends DottyTest { //| a#35),Array), scala$Array$$T, TypeAlias(TypeRef(ThisType(module class scala# //| 35),Char))), TypeRef(ThisType(module class scala#35),Int), TypeRef(ThisType( //| module class scala#35),Int)), TypeRef(ThisType(module class lang#57),String) - //| ), JavaMethodType(List(x$0), List(RefinedType(TypeRef(ThisType(module class + //| ), JavaMethodType(List(x$0), List(RefinedType(TypeRef(ThisType(module class //| scala#35),Array), scala$Array$$T, TypeAlias(TypeRef(ThisType(module class sc //| ala#35),Char)))), TypeRef(ThisType(module class lang#57),String)), JavaMetho //| dType(List(x$0), List(TypeRef(ThisType(module class scala#35),Any)), TypeRef diff --git a/compiler/test/worksheets/nesting.sc b/compiler/test/worksheets/nesting.sc index a6fc924320a0..bb3e9a71146e 100644 --- a/compiler/test/worksheets/nesting.sc +++ b/compiler/test/worksheets/nesting.sc @@ -2,7 +2,7 @@ package dotty.tools.dotc.core object nesting { class C { - + class D { private def x = "D" def show = x @@ -10,7 +10,7 @@ object nesting { println(x) } } - + val foo: D = { class D extends C.this.D { private def x = "foo.D" @@ -21,11 +21,11 @@ object nesting { new D } } - + val c = new C //> c : dotty.tools.dotc.core.nesting.C = dotty.tools.dotc.core.nesting$C@1a84d //| a23 val d = c.foo //> d : dotty.tools.dotc.core.nesting.c.D = dotty.tools.dotc.core.nesting$C$D$1 //| @2705d88a d.show //> res0: String = foo.D - + } \ No newline at end of file diff --git a/compiler/test/worksheets/periodtest.sc b/compiler/test/worksheets/periodtest.sc index 09c02da19a10..68a7cc43b20e 100644 --- a/compiler/test/worksheets/periodtest.sc +++ b/compiler/test/worksheets/periodtest.sc @@ -2,9 +2,9 @@ package dotty.tools.dotc.core object periodtest { println("Welcome to the Scala worksheet") //> Welcome to the Scala worksheet - + import Periods._ - + val p1 = Period(1, 2, 7) //> p1 : dotty.tools.dotc.core.Periods.Period = Period(2..7, run = 1) val p2 = Period(1, 3, 7) //> p2 : dotty.tools.dotc.core.Periods.Period = Period(3..7, run = 1) p1 contains p2 //> res0: Boolean = true diff --git a/compiler/test/worksheets/positiontest.sc b/compiler/test/worksheets/positiontest.sc index 11cc54dbeab9..b152368145f1 100644 --- a/compiler/test/worksheets/positiontest.sc +++ b/compiler/test/worksheets/positiontest.sc @@ -5,7 +5,7 @@ import Positions._ object positiontest { println("Welcome to the Scala worksheet") //> Welcome to the Scala worksheet - + val p = Position(0, 1, 0) //> p : dotty.tools.dotc.util.Positions.Position = [0..1] val p2 = Position(0, 2) //> p2 : dotty.tools.dotc.util.Positions.Position = [0..2] val p3 = Position(1, 0) //> p3 : dotty.tools.dotc.util.Positions.Position = [no position] diff --git a/compiler/test/worksheets/testnames.sc b/compiler/test/worksheets/testnames.sc index 282b07d4edb7..8f042b7036fd 100644 --- a/compiler/test/worksheets/testnames.sc +++ b/compiler/test/worksheets/testnames.sc @@ -2,7 +2,7 @@ package dotty.tools.dotc.core object testnames { println("Welcome to the Scala worksheet") //> Welcome to the Scala worksheet - + import Names._ val n = termName("hello") //> n : dotty.tools.dotc.core.Names.TermName = hello val tn = n.toTypeName //> tn : dotty.tools.dotc.core.Names.TypeName = hello @@ -10,7 +10,7 @@ object testnames { assert(tn.toTermName eq n) assert(tn.toLocalName eq ln) assert(n.toLocalName eq ln) - + n == tn //> res0: Boolean = false n == ln //> res1: Boolean = false n eq tn //> res2: Boolean = false @@ -19,7 +19,7 @@ object testnames { val foo = encodedTermName("++") //> foo : dotty.tools.dotc.core.Names.TermName = $plus$plus foo.hashCode //> res5: Int = 5 foo.toTypeName.hashCode //> res6: Int = -5 - + val nfoo = n ++ foo //> nfoo : dotty.tools.dotc.core.testnames.n.ThisName = hello$plus$plus nfoo contains '$' //> res7: Boolean = true nfoo.replace('$', '.') //> res8: dotty.tools.dotc.core.testnames.nfoo.ThisName = hello.plus.plus @@ -36,7 +36,7 @@ object testnames { termName("abc") //> res18: dotty.tools.dotc.core.Names.TermName = abc nfoo.filter(_ >= 'l') //> res19: dotty.tools.dotc.core.Names.Name = lloplusplus nfoo map (_.toUpper) //> res20: dotty.tools.dotc.core.Names.Name = HELLO$PLUS$PLUS - + import Decorators._ val local = "local".toTermName.toLocalName //> local : dotty.tools.dotc.core.Names.LocalName = local diff --git a/library/src/scala/runtime/LazyVals.scala b/library/src/scala/runtime/LazyVals.scala index d8c89c7abf28..0edbe0e748f4 100644 --- a/library/src/scala/runtime/LazyVals.scala +++ b/library/src/scala/runtime/LazyVals.scala @@ -10,7 +10,7 @@ import scala.annotation.* object LazyVals { @nowarn private[this] val unsafe: sun.misc.Unsafe = { - def throwInitializationException() = + def throwInitializationException() = throw new ExceptionInInitializerError( new IllegalStateException("Can't find instance of sun.misc.Unsafe") ) diff --git a/sbt-test/sbt-dotty/tasty-inspector-jars/build.sbt b/sbt-test/sbt-dotty/tasty-inspector-jars/build.sbt index 59dd85290bf0..3bece1b43fa7 100644 --- a/sbt-test/sbt-dotty/tasty-inspector-jars/build.sbt +++ b/sbt-test/sbt-dotty/tasty-inspector-jars/build.sbt @@ -15,7 +15,7 @@ lazy val inspector = project .settings( scalaVersion := dottyVersion, libraryDependencies += "org.scala-lang" %% "scala3-tasty-inspector" % scalaVersion.value, - runTest := + runTest := Def.sequential( Def.task(IO.copyFile((lib/Compile/packageBin).value, jarDest)), (Compile/run).toTask(" " + jarDest.getAbsolutePath) diff --git a/sbt-test/source-dependencies/implicit-search/changes/A1.scala b/sbt-test/source-dependencies/implicit-search/changes/A1.scala index 7aa91d096277..69c493db2131 100644 --- a/sbt-test/source-dependencies/implicit-search/changes/A1.scala +++ b/sbt-test/source-dependencies/implicit-search/changes/A1.scala @@ -1 +1 @@ -object A +object A diff --git a/sbt-test/source-dependencies/java-static/test b/sbt-test/source-dependencies/java-static/test index 42890ca74f4d..0bb6f50169e4 100644 --- a/sbt-test/source-dependencies/java-static/test +++ b/sbt-test/source-dependencies/java-static/test @@ -2,7 +2,7 @@ # the statics as an object without a file and so the Analyzer must know to look for the # object's linked class. # This test verifies this happens. -# The test compiles a Java class with a static field. +# The test compiles a Java class with a static field. # It then adds a Scala object that references the static field. Because the object only depends on a # static member and because the Java source is not included in the compilation (since it didn't change), # this triggers the special case above. diff --git a/sbt-test/source-dependencies/restore-classes/changes/A2.scala b/sbt-test/source-dependencies/restore-classes/changes/A2.scala index 10d738255cca..778f16ab95cc 100644 --- a/sbt-test/source-dependencies/restore-classes/changes/A2.scala +++ b/sbt-test/source-dependencies/restore-classes/changes/A2.scala @@ -2,4 +2,4 @@ object A { val x = "a" } -class C +class C diff --git a/scaladoc-testcases/src/example/typeAndObjects/binaryops.scala b/scaladoc-testcases/src/example/typeAndObjects/binaryops.scala index 890d39732ca8..6474d04f91ef 100644 --- a/scaladoc-testcases/src/example/typeAndObjects/binaryops.scala +++ b/scaladoc-testcases/src/example/typeAndObjects/binaryops.scala @@ -5,7 +5,7 @@ sealed trait Expr object Expr{ case class BinaryOp(offset: Int, lhs: Expr, op: BinaryOp.Op, rhs: Expr) extends Expr - + object BinaryOp{ sealed trait Op case object `<<` extends Op diff --git a/scaladoc-testcases/src/tests/contextBounds.scala b/scaladoc-testcases/src/tests/contextBounds.scala index 1925f7f40994..794af0b8b8f8 100644 --- a/scaladoc-testcases/src/tests/contextBounds.scala +++ b/scaladoc-testcases/src/tests/contextBounds.scala @@ -25,15 +25,15 @@ class A: def a[T <: String | Int : ([T] =>> T match { case String => A case Int => B })](t: T): T = t - def falsePositive[T](evidence$1: ClassTag[T]): Int + def falsePositive[T](evidence$1: ClassTag[T]): Int = 1 // Scala spec stats that behaviour of names with `$` is undefined. // Scaladoc documents definition below as `def falsePositive2[T: ClassTag]: Int` // that is equivalent of methods below - // def falsePositive2[T](implicit evidence$3: ClassTag[T]): Int + // def falsePositive2[T](implicit evidence$3: ClassTag[T]): Int // = 1 class Outer[A]: - def falsePositiveInner[T](implicit evidence$3: ClassTag[A]): Int + def falsePositiveInner[T](implicit evidence$3: ClassTag[A]): Int = 1 \ No newline at end of file diff --git a/scaladoc-testcases/src/tests/snippetComments.scala b/scaladoc-testcases/src/tests/snippetComments.scala index 39b15648103e..9f54b8a465f1 100644 --- a/scaladoc-testcases/src/tests/snippetComments.scala +++ b/scaladoc-testcases/src/tests/snippetComments.scala @@ -3,7 +3,7 @@ package tests.snippetComments /** * This is my codeblock - * + * * ``` * //{{ * import xd @@ -20,7 +20,7 @@ package tests.snippetComments * val y = 2 // comment in the same line * // comment in new line * val z = 3 - * + * * //{{ * val hideMe = 7 * //}}