Skip to content

Migrate remaning commigs from scala3doc repo #10148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Nov 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions scala3doc-testcases/src/example/Inheritance.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ import example.level2.Documentation
abstract class DocumentationInheritance[T, A <: Int, B >: String, -X, +Y] extends Documentation[T, A, B, X, Y] {}

class DocumentationInheritanceMethod:
def wierdMethod[T, A <: Int, B >: String](t: T, a: A): B = ???
def threOtherWay[A <: Nothing, B >: Any](a: A, c: B): Unit = ???
def wierdMethod[T, A <: Int, B >: String](t: T, a: A): B = ???
def threOtherWay[A <: Nothing, B >: Any](a: A, c: B): Unit = ???

class A:
def this(s: String) = this()
def this(i: Int) = this()
type I = Int
given Unit = ()
extension (u: Unit) def foo = "foo"
object X
class B extends C:
class D extends C
def this(s: String) = this()
def this(i: Int) = this()
type I = Int
given Unit = ()
extension (u: Unit) def foo = "foo"
object X
class B extends C:
class D extends C

class C extends A
232 changes: 116 additions & 116 deletions scala3doc-testcases/src/tests/FilterTest.scala
Original file line number Diff line number Diff line change
@@ -1,127 +1,127 @@
package tests

trait FilterTestBaseTrait:
/** doc */
protected def protectetDefInheriteTrait(a: Int): String = ???
/** doc */
private def privateDefInheritedTrait(a: Int): String = ???
/** doc */
def publicDefInheritedTrait(a: Int): String = ???
/** doc */
object PublicObjectInheritedTrait
/** doc */
protected object ProtectedObjectInheritedTrait

/** doc */
protected val protectetValInheritedTrait = 123
/** doc */
private val privateValInheritedTrait = 344
/** doc */
val publicValInheritedTrait = 567
/** doc */
protected def protectetDefInheriteTrait(a: Int): String = ???
/** doc */
private def privateDefInheritedTrait(a: Int): String = ???
/** doc */
def publicDefInheritedTrait(a: Int): String = ???

/** doc */
object PublicObjectInheritedTrait
/** doc */
protected object ProtectedObjectInheritedTrait

/** doc */
protected val protectetValInheritedTrait = 123
/** doc */
private val privateValInheritedTrait = 344
/** doc */
val publicValInheritedTrait = 567

class FilterTestBase:
/** doc */
sealed abstract class BInherited
/** doc */
abstract case class CInherited(s: String)
/** doc */
sealed case class DInherited(c: String)
/** doc */
final case class EInherited(c: String)
/** doc */
private class PrivateInherited
/** doc */
protected class ProtectedInherited
/** doc */
protected def protectetDefInherited(a: Int): String = ???
/** doc */
private def privateDefInherited(a: Int): String = ???
/** doc */
def publicDefInherited(a: Int): String = ???
/** doc */
object PublicObjectInherited
/** doc */
protected object ProtectedObjectInherited

/** doc */
protected val protectetValInherited = 123
/** doc */
private val privateValInherited = 344
/** doc */
val publicValInherited = 567
/** doc */
protected type protectedTypeInherited = 123
/** doc */
private type privateTypeInherited = 344
/** doc */
type publicTypeInherited = 567
/** doc */
protected given Set[String | Int] = Set(1, "ala")
/** doc */
given Map[String, Double] = Map.empty

/** doc */
protected given namedSet as Set[String | Int] = Set(1, "ala")
/** doc */
given namedMap as Map[String, Double] = Map.empty
/** doc */
sealed abstract class BInherited
/** doc */
abstract case class CInherited(s: String)
/** doc */
sealed case class DInherited(c: String)
/** doc */
final case class EInherited(c: String)
/** doc */
private class PrivateInherited
/** doc */
protected class ProtectedInherited
/** doc */
protected def protectetDefInherited(a: Int): String = ???
/** doc */
private def privateDefInherited(a: Int): String = ???
/** doc */
def publicDefInherited(a: Int): String = ???

/** doc */
object PublicObjectInherited
/** doc */
protected object ProtectedObjectInherited

/** doc */
protected val protectetValInherited = 123
/** doc */
private val privateValInherited = 344
/** doc */
val publicValInherited = 567

/** doc */
protected type protectedTypeInherited = 123
/** doc */
private type privateTypeInherited = 344
/** doc */
type publicTypeInherited = 567

/** doc */
protected given Set[String | Int] = Set(1, "ala")
/** doc */
given Map[String, Double] = Map.empty

/** doc */
protected given namedSet as Set[String | Int] = Set(1, "ala")
/** doc */
given namedMap as Map[String, Double] = Map.empty

class FilterTest extends FilterTestBase with FilterTestBaseTrait:
/** doc */
sealed abstract class B
/** doc */
abstract case class C(s: String)
/** doc */
sealed case class D(c: String)
/** doc */
final case class E(c: String)
/** doc */
private class Private
/** doc */
protected class Protected

/** doc */
object PublicObject
/** doc */
protected object ProtectedObject
/** doc */
protected def protectetDef(a: B): String = ???
/** doc */
private def privateDef(a: C): String = ???
/** doc */
def publicDef(a: D): FilterTest = ???

/** doc */
protected val protectetVal = 123
/** doc */
private val privateVal= 344
/** doc */
val publicVal = 567
/** doc */
protected type protectedType = 123
/** doc */
private type privateType= 344
/** doc */
type publicType = 567
/** doc */
protected given Seq[String | Int | Double] = List(1)
/** doc */
given List[String] = "ula" :: Nil
/** doc */
given namedList as List[String] = "ula" :: Nil
/** doc */
protected given namedSeq as Seq[String | Int | Double] = List(1)
/** doc */
sealed abstract class B
/** doc */
abstract case class C(s: String)
/** doc */
sealed case class D(c: String)
/** doc */
final case class E(c: String)
/** doc */
private class Private
/** doc */
protected class Protected

/** doc */
object PublicObject
/** doc */
protected object ProtectedObject

/** doc */
protected def protectetDef(a: B): String = ???
/** doc */
private def privateDef(a: C): String = ???
/** doc */
def publicDef(a: D): FilterTest = ???


/** doc */
protected val protectetVal = 123
/** doc */
private val privateVal= 344
/** doc */
val publicVal = 567

/** doc */
protected type protectedType = 123
/** doc */
private type privateType= 344
/** doc */
type publicType = 567

/** doc */
protected given Seq[String | Int | Double] = List(1)
/** doc */
given List[String] = "ula" :: Nil

/** doc */
given namedList as List[String] = "ula" :: Nil
/** doc */
protected given namedSeq as Seq[String | Int | Double] = List(1)

extension (e: FilterTest):
def extensionMethod(name: FilterTest): FilterTest = ???
def extensionMethod(name: FilterTest): FilterTest = ???

extension (e: FilterTestBase):
def extensionMethodBase(name: FilterTest): FilterTest = ???
def extensionMethodBase(name: FilterTest): FilterTest = ???
4 changes: 2 additions & 2 deletions scala3doc-testcases/src/tests/annotations.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ class AnnotatedParams(@MyAnnotation val a: String, @AnnotationWithMultiArg(2, "c

class AnnotatedMethods
{
@MyAnnotation @AnnotationWithMultiArg(2, "cda", 'a', 'b', 'c') def a: String
= ???
@MyAnnotation @AnnotationWithMultiArg(2, "cda", 'a', 'b', 'c') def a: String
= ???
}
14 changes: 7 additions & 7 deletions scala3doc-testcases/src/tests/annotationsExample.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ package annotationsExample
import scala.annotation.StaticAnnotation

enum Enum {
case A extends Enum
case B extends Enum
case C extends Enum
case A extends Enum
case B extends Enum
case C extends Enum
}

class SomeObject(val s: String)
Expand All @@ -28,8 +28,8 @@ class AnnotatedParams(@MyAnnotation val a: String, @AnnotationWithMultiArg(2, "c

class AnnotatedMethods
{
@MyAnnotation
@AnnotationWithMultiArg(2, "cda", 'a', 'b', 'c')
def a: String
= ???
@MyAnnotation
@AnnotationWithMultiArg(2, "cda", 'a', 'b', 'c')
def a: String
= ???
}
6 changes: 3 additions & 3 deletions scala3doc-testcases/src/tests/classSignatureTestSource.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import example.level2.Documentation

abstract class Documentation[T, A <: Int, B >: String, -X, +Y](c1: String, val c2: List[T]) extends Seq[T] with Product with Serializable
{
def this(ac: String)
def this(ac: String)
= this(ac, Nil)

def this()
def this()
= this("", Nil)

def this(x: T)
def this(x: T)
= this()

class innerDocumentationClass
Expand Down
34 changes: 17 additions & 17 deletions scala3doc-testcases/src/tests/companionObjectSignatures.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@ package companionObjectSignatures

case class CaseClass(parameterOfClassConstructor: String)
{
val classProperty1: String
= ???
val classProperty2: String
= ???
def methodInClass1(): String
= ???
def methodInClass2(): CaseClass
= ???
val classProperty1: String
= ???
val classProperty2: String
= ???
def methodInClass1(): String
= ???

def methodInClass2(): CaseClass
= ???
}

case object CaseClass
{
val parameterOfObject: String
= "asd"

def methodInCompanion1(): String
= ???
def methodInCompanion2(): CaseClass
= ???
val parameterOfObject: String
= "asd"

def methodInCompanion1(): String
= ???

def methodInCompanion2(): CaseClass
= ???
}

case class WithoutExplicitCompanion(parameter: Int)
Expand Down
Loading