summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/reflect/scala/reflect/api/Annotations.scala12
-rw-r--r--src/reflect/scala/reflect/api/Mirrors.scala7
-rw-r--r--src/reflect/scala/reflect/api/Names.scala16
-rw-r--r--src/reflect/scala/reflect/api/Position.scala2
-rw-r--r--src/reflect/scala/reflect/api/Positions.scala3
-rw-r--r--src/reflect/scala/reflect/api/Scopes.scala4
-rw-r--r--src/reflect/scala/reflect/api/Symbols.scala16
-rw-r--r--src/reflect/scala/reflect/api/Trees.scala106
-rw-r--r--src/reflect/scala/reflect/api/Types.scala44
-rw-r--r--src/reflect/scala/reflect/internal/AnnotationInfos.scala2
-rw-r--r--src/reflect/scala/reflect/internal/Names.scala4
-rw-r--r--src/reflect/scala/reflect/internal/Trees.scala2
-rw-r--r--src/reflect/scala/reflect/internal/Types.scala4
-rw-r--r--test/files/run/compiler-asSeenFrom.scala50
-rw-r--r--test/files/run/t7096.scala47
-rw-r--r--test/files/run/t8190.check95
-rw-r--r--test/files/run/t8190.scala210
17 files changed, 526 insertions, 98 deletions
diff --git a/src/reflect/scala/reflect/api/Annotations.scala b/src/reflect/scala/reflect/api/Annotations.scala
index 4fec7a09ae..5171a2e047 100644
--- a/src/reflect/scala/reflect/api/Annotations.scala
+++ b/src/reflect/scala/reflect/api/Annotations.scala
@@ -83,14 +83,18 @@ trait Annotations { self: Universe =>
* @template
* @group Annotations
*/
- type JavaArgument >: Null <: AnyRef
+ type JavaArgument >: Null <: AnyRef with JavaArgumentApi
+ /** Has no special methods. Is here to provides erased identity for `CompoundType`.
+ * @group API
+ */
+ trait JavaArgumentApi
/** A literal argument to a Java annotation as `"Use X instead"` in `@Deprecated("Use X instead")`
* @template
* @group Annotations
*/
- type LiteralArgument >: Null <: AnyRef with JavaArgument with LiteralArgumentApi
+ type LiteralArgument >: Null <: LiteralArgumentApi with JavaArgument
/** The constructor/extractor for `LiteralArgument` instances.
* @group Extractors
@@ -119,7 +123,7 @@ trait Annotations { self: Universe =>
* @template
* @group Annotations
*/
- type ArrayArgument >: Null <: AnyRef with JavaArgument with ArrayArgumentApi
+ type ArrayArgument >: Null <: ArrayArgumentApi with JavaArgument
/** The constructor/extractor for `ArrayArgument` instances.
* @group Extractors
@@ -148,7 +152,7 @@ trait Annotations { self: Universe =>
* @template
* @group Annotations
*/
- type NestedArgument >: Null <: AnyRef with JavaArgument with NestedArgumentApi
+ type NestedArgument >: Null <: NestedArgumentApi with JavaArgument
/** The constructor/extractor for `NestedArgument` instances.
* @group Extractors
diff --git a/src/reflect/scala/reflect/api/Mirrors.scala b/src/reflect/scala/reflect/api/Mirrors.scala
index f11b9a5c55..0d39f628ce 100644
--- a/src/reflect/scala/reflect/api/Mirrors.scala
+++ b/src/reflect/scala/reflect/api/Mirrors.scala
@@ -225,7 +225,12 @@ trait Mirrors { self: Universe =>
/** Abstracts the runtime representation of a class on the underlying platform.
* @group Mirrors
*/
- type RuntimeClass >: Null
+ type RuntimeClass >: Null <: AnyRef
+
+ /** Has no special methods. Is here to provides erased identity for `RuntimeClass`.
+ * @group API
+ */
+ trait RuntimeClassApi
// todo. an improvement might be having mirrors reproduce the structure of the reflection domain
// e.g. a ClassMirror could also have a list of fields, methods, constructors and so on
diff --git a/src/reflect/scala/reflect/api/Names.scala b/src/reflect/scala/reflect/api/Names.scala
index 87d7f9fd8e..23436ca8e7 100644
--- a/src/reflect/scala/reflect/api/Names.scala
+++ b/src/reflect/scala/reflect/api/Names.scala
@@ -44,17 +44,27 @@ trait Names {
/** The abstract type of names.
* @group Names
*/
- type Name >: Null <: NameApi
+ type Name >: Null <: AnyRef with NameApi
/** The abstract type of names representing terms.
* @group Names
*/
- type TypeName >: Null <: Name
+ type TypeName >: Null <: TypeNameApi with Name
+
+ /** Has no special methods. Is here to provides erased identity for `TypeName`.
+ * @group API
+ */
+ trait TypeNameApi
/** The abstract type of names representing types.
* @group Names
*/
- type TermName >: Null <: Name
+ type TermName >: Null <: TermNameApi with Name
+
+ /** Has no special methods. Is here to provides erased identity for `TermName`.
+ * @group API
+ */
+ trait TermNameApi
/** The API of Name instances.
* @group API
diff --git a/src/reflect/scala/reflect/api/Position.scala b/src/reflect/scala/reflect/api/Position.scala
index 2019e2f1d9..891d3a43ef 100644
--- a/src/reflect/scala/reflect/api/Position.scala
+++ b/src/reflect/scala/reflect/api/Position.scala
@@ -20,7 +20,7 @@ import scala.reflect.macros.Attachments
trait Position extends Attachments {
/** @inheritdoc */
- type Pos >: Null <: Position
+ type Pos >: Null <: AnyRef with Position
/** Java file corresponding to the source file of this position.
*
diff --git a/src/reflect/scala/reflect/api/Positions.scala b/src/reflect/scala/reflect/api/Positions.scala
index 8ad46418f8..63ad605656 100644
--- a/src/reflect/scala/reflect/api/Positions.scala
+++ b/src/reflect/scala/reflect/api/Positions.scala
@@ -19,7 +19,8 @@ trait Positions {
* The main documentation entry about positions is located at [[scala.reflect.api.Position]].
* @group Positions
*/
- type Position >: Null <: scala.reflect.api.Position { type Pos = Position }
+ type Position >: Null <: AnyRef with scala.reflect.api.Position { type Pos = Position }
+
/** A special "missing" position.
* @group Positions
*/
diff --git a/src/reflect/scala/reflect/api/Scopes.scala b/src/reflect/scala/reflect/api/Scopes.scala
index 2eb477f652..9327fb9762 100644
--- a/src/reflect/scala/reflect/api/Scopes.scala
+++ b/src/reflect/scala/reflect/api/Scopes.scala
@@ -27,7 +27,7 @@ trait Scopes { self: Universe =>
* @template
* @group Scopes
*/
- type Scope >: Null <: ScopeApi
+ type Scope >: Null <: AnyRef with ScopeApi
/** The API that all scopes support
* @group API
@@ -43,7 +43,7 @@ trait Scopes { self: Universe =>
* @template
* @group Scopes
*/
- type MemberScope >: Null <: Scope with MemberScopeApi
+ type MemberScope >: Null <: AnyRef with MemberScopeApi with Scope
/** The API that all member scopes support
* @group API
diff --git a/src/reflect/scala/reflect/api/Symbols.scala b/src/reflect/scala/reflect/api/Symbols.scala
index 7dd5bcc4ab..562129d893 100644
--- a/src/reflect/scala/reflect/api/Symbols.scala
+++ b/src/reflect/scala/reflect/api/Symbols.scala
@@ -60,51 +60,51 @@ trait Symbols { self: Universe =>
* @group Symbols
* @template
*/
- type Symbol >: Null <: SymbolApi
+ type Symbol >: Null <: AnyRef with SymbolApi
/** The type of type symbols representing type, class, and trait declarations,
* as well as type parameters.
* @group Symbols
* @template
*/
- type TypeSymbol >: Null <: Symbol with TypeSymbolApi
+ type TypeSymbol >: Null <: TypeSymbolApi with Symbol
/** The type of term symbols representing val, var, def, and object declarations as
* well as packages and value parameters.
* @group Symbols
* @template
*/
- type TermSymbol >: Null <: Symbol with TermSymbolApi
+ type TermSymbol >: Null <: TermSymbolApi with Symbol
/** The type of method symbols representing def declarations.
* @group Symbols
* @template
*/
- type MethodSymbol >: Null <: TermSymbol with MethodSymbolApi
+ type MethodSymbol >: Null <: MethodSymbolApi with TermSymbol
/** The type of module symbols representing object declarations.
* @group Symbols
* @template
*/
- type ModuleSymbol >: Null <: TermSymbol with ModuleSymbolApi
+ type ModuleSymbol >: Null <: ModuleSymbolApi with TermSymbol
/** The type of class symbols representing class and trait definitions.
* @group Symbols
* @template
*/
- type ClassSymbol >: Null <: TypeSymbol with ClassSymbolApi
+ type ClassSymbol >: Null <: ClassSymbolApi with TypeSymbol
/** The type of free terms introduced by reification.
* @group Symbols
* @template
*/
- type FreeTermSymbol >: Null <: TermSymbol with FreeTermSymbolApi
+ type FreeTermSymbol >: Null <: FreeTermSymbolApi with TermSymbol
/** The type of free types introduced by reification.
* @group Symbols
* @template
*/
- type FreeTypeSymbol >: Null <: TypeSymbol with FreeTypeSymbolApi
+ type FreeTypeSymbol >: Null <: FreeTypeSymbolApi with TypeSymbol
/** A special "missing" symbol. Commonly used in the API to denote a default or empty value.
* @group Symbols
diff --git a/src/reflect/scala/reflect/api/Trees.scala b/src/reflect/scala/reflect/api/Trees.scala
index 60e00ca5fd..95d9d84597 100644
--- a/src/reflect/scala/reflect/api/Trees.scala
+++ b/src/reflect/scala/reflect/api/Trees.scala
@@ -59,7 +59,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type Tree >: Null <: TreeApi
+ type Tree >: Null <: AnyRef with TreeApi
/** The API that all trees support.
* The main source of information about trees is the [[scala.reflect.api.Trees]] page.
@@ -216,7 +216,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type TermTree >: Null <: AnyRef with Tree with TermTreeApi
+ type TermTree >: Null <: TermTreeApi with Tree
/** The API that all term trees support
* @group API
@@ -229,7 +229,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type TypTree >: Null <: AnyRef with Tree with TypTreeApi
+ type TypTree >: Null <: TypTreeApi with Tree
/** The API that all typ trees support
* @group API
@@ -241,7 +241,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type SymTree >: Null <: AnyRef with Tree with SymTreeApi
+ type SymTree >: Null <: SymTreeApi with Tree
/** The API that all sym trees support
* @group API
@@ -255,7 +255,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type NameTree >: Null <: AnyRef with Tree with NameTreeApi
+ type NameTree >: Null <: NameTreeApi with Tree
/** The API that all name trees support
* @group API
@@ -273,7 +273,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type RefTree >: Null <: SymTree with NameTree with RefTreeApi
+ type RefTree >: Null <: RefTreeApi with SymTree with NameTree
/** The API that all ref trees support
* @group API
@@ -307,7 +307,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type DefTree >: Null <: SymTree with NameTree with DefTreeApi
+ type DefTree >: Null <: DefTreeApi with SymTree with NameTree
/** The API that all def trees support
* @group API
@@ -322,7 +322,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type MemberDef >: Null <: DefTree with MemberDefApi
+ type MemberDef >: Null <: MemberDefApi with DefTree
/** The API that all member defs support
* @group API
@@ -336,7 +336,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type PackageDef >: Null <: MemberDef with PackageDefApi
+ type PackageDef >: Null <: PackageDefApi with MemberDef
/** The constructor/extractor for `PackageDef` instances.
* @group Extractors
@@ -369,7 +369,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type ImplDef >: Null <: MemberDef with ImplDefApi
+ type ImplDef >: Null <: ImplDefApi with MemberDef
/** The API that all impl defs support
* @group API
@@ -383,7 +383,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type ClassDef >: Null <: ImplDef with ClassDefApi
+ type ClassDef >: Null <: ClassDefApi with ImplDef
/** The constructor/extractor for `ClassDef` instances.
* @group Extractors
@@ -428,7 +428,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type ModuleDef >: Null <: ImplDef with ModuleDefApi
+ type ModuleDef >: Null <: ModuleDefApi with ImplDef
/** The constructor/extractor for `ModuleDef` instances.
* @group Extractors
@@ -468,7 +468,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type ValOrDefDef >: Null <: MemberDef with ValOrDefDefApi
+ type ValOrDefDef >: Null <: ValOrDefDefApi with MemberDef
/** The API that all val defs and def defs support
* @group API
@@ -499,7 +499,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type ValDef >: Null <: ValOrDefDef with ValDefApi
+ type ValDef >: Null <: ValDefApi with ValOrDefDef
/** The constructor/extractor for `ValDef` instances.
* @group Extractors
@@ -548,7 +548,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type DefDef >: Null <: ValOrDefDef with DefDefApi
+ type DefDef >: Null <: DefDefApi with ValOrDefDef
/** The constructor/extractor for `DefDef` instances.
* @group Extractors
@@ -597,7 +597,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type TypeDef >: Null <: MemberDef with TypeDefApi
+ type TypeDef >: Null <: TypeDefApi with MemberDef
/** The constructor/extractor for `TypeDef` instances.
* @group Extractors
@@ -656,7 +656,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type LabelDef >: Null <: DefTree with TermTree with LabelDefApi
+ type LabelDef >: Null <: LabelDefApi with DefTree with TermTree
/** The constructor/extractor for `LabelDef` instances.
* @group Extractors
@@ -758,7 +758,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type Import >: Null <: SymTree with ImportApi
+ type Import >: Null <: ImportApi with SymTree
/** The constructor/extractor for `Import` instances.
* @group Extractors
@@ -810,7 +810,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type Template >: Null <: SymTree with TemplateApi
+ type Template >: Null <: TemplateApi with SymTree
/** The constructor/extractor for `Template` instances.
* @group Extractors
@@ -862,7 +862,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type Block >: Null <: TermTree with BlockApi
+ type Block >: Null <: BlockApi with TermTree
/** The constructor/extractor for `Block` instances.
* @group Extractors
@@ -901,7 +901,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type CaseDef >: Null <: AnyRef with Tree with CaseDefApi
+ type CaseDef >: Null <: CaseDefApi with Tree
/** The constructor/extractor for `CaseDef` instances.
* @group Extractors
@@ -948,7 +948,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type Alternative >: Null <: TermTree with AlternativeApi
+ type Alternative >: Null <: AlternativeApi with TermTree
/** The constructor/extractor for `Alternative` instances.
* @group Extractors
@@ -980,7 +980,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type Star >: Null <: TermTree with StarApi
+ type Star >: Null <: StarApi with TermTree
/** The constructor/extractor for `Star` instances.
* @group Extractors
@@ -1015,7 +1015,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type Bind >: Null <: DefTree with BindApi
+ type Bind >: Null <: BindApi with DefTree
/** The constructor/extractor for `Bind` instances.
* @group Extractors
@@ -1078,7 +1078,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type UnApply >: Null <: TermTree with UnApplyApi
+ type UnApply >: Null <: UnApplyApi with TermTree
/** The constructor/extractor for `UnApply` instances.
* @group Extractors
@@ -1114,7 +1114,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type Function >: Null <: TermTree with SymTree with FunctionApi
+ type Function >: Null <: FunctionApi with TermTree with SymTree
/** The constructor/extractor for `Function` instances.
* @group Extractors
@@ -1152,7 +1152,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type Assign >: Null <: TermTree with AssignApi
+ type Assign >: Null <: AssignApi with TermTree
/** The constructor/extractor for `Assign` instances.
* @group Extractors
@@ -1188,7 +1188,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type AssignOrNamedArg >: Null <: TermTree with AssignOrNamedArgApi
+ type AssignOrNamedArg >: Null <: AssignOrNamedArgApi with TermTree
/** The constructor/extractor for `AssignOrNamedArg` instances.
* @group Extractors
@@ -1229,7 +1229,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type If >: Null <: TermTree with IfApi
+ type If >: Null <: IfApi with TermTree
/** The constructor/extractor for `If` instances.
* @group Extractors
@@ -1280,7 +1280,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type Match >: Null <: TermTree with MatchApi
+ type Match >: Null <: MatchApi with TermTree
/** The constructor/extractor for `Match` instances.
* @group Extractors
@@ -1315,7 +1315,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type Return >: Null <: TermTree with SymTree with ReturnApi
+ type Return >: Null <: ReturnApi with SymTree with TermTree
/** The constructor/extractor for `Return` instances.
* @group Extractors
@@ -1347,7 +1347,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type Try >: Null <: TermTree with TryApi
+ type Try >: Null <: TryApi with TermTree
/** The constructor/extractor for `Try` instances.
* @group Extractors
@@ -1385,7 +1385,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type Throw >: Null <: TermTree with ThrowApi
+ type Throw >: Null <: ThrowApi with TermTree
/** The constructor/extractor for `Throw` instances.
* @group Extractors
@@ -1415,7 +1415,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type New >: Null <: TermTree with NewApi
+ type New >: Null <: NewApi with TermTree
/** The constructor/extractor for `New` instances.
* @group Extractors
@@ -1465,7 +1465,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type Typed >: Null <: TermTree with TypedApi
+ type Typed >: Null <: TypedApi with TermTree
/** The constructor/extractor for `Typed` instances.
* @group Extractors
@@ -1498,7 +1498,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type GenericApply >: Null <: TermTree with GenericApplyApi
+ type GenericApply >: Null <: GenericApplyApi with TermTree
/** The API that all applies support
* @group API
@@ -1519,7 +1519,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type TypeApply >: Null <: GenericApply with TypeApplyApi
+ type TypeApply >: Null <: TypeApplyApi with GenericApply
/** The constructor/extractor for `TypeApply` instances.
* @group Extractors
@@ -1557,7 +1557,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type Apply >: Null <: GenericApply with ApplyApi
+ type Apply >: Null <: ApplyApi with GenericApply
/** The constructor/extractor for `Apply` instances.
* @group Extractors
@@ -1594,7 +1594,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type Super >: Null <: TermTree with SuperApi
+ type Super >: Null <: SuperApi with TermTree
/** The constructor/extractor for `Super` instances.
* @group Extractors
@@ -1640,7 +1640,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type This >: Null <: TermTree with SymTree with ThisApi
+ type This >: Null <: ThisApi with TermTree with SymTree
/** The constructor/extractor for `This` instances.
* @group Extractors
@@ -1675,7 +1675,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type Select >: Null <: RefTree with SelectApi
+ type Select >: Null <: SelectApi with RefTree
/** The constructor/extractor for `Select` instances.
* @group Extractors
@@ -1714,7 +1714,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type Ident >: Null <: RefTree with IdentApi
+ type Ident >: Null <: IdentApi with RefTree
/** The constructor/extractor for `Ident` instances.
* @group Extractors
@@ -1753,7 +1753,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type ReferenceToBoxed >: Null <: TermTree with ReferenceToBoxedApi
+ type ReferenceToBoxed >: Null <: ReferenceToBoxedApi with TermTree
/** The constructor/extractor for `ReferenceToBoxed` instances.
* @group Extractors
@@ -1797,7 +1797,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type Literal >: Null <: TermTree with LiteralApi
+ type Literal >: Null <: LiteralApi with TermTree
/** The constructor/extractor for `Literal` instances.
* @group Extractors
@@ -1830,7 +1830,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type Annotated >: Null <: AnyRef with Tree with AnnotatedApi
+ type Annotated >: Null <: AnnotatedApi with Tree
/** The constructor/extractor for `Annotated` instances.
* @group Extractors
@@ -1864,7 +1864,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type SingletonTypeTree >: Null <: TypTree with SingletonTypeTreeApi
+ type SingletonTypeTree >: Null <: SingletonTypeTreeApi with TypTree
/** The constructor/extractor for `SingletonTypeTree` instances.
* @group Extractors
@@ -1894,7 +1894,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type SelectFromTypeTree >: Null <: TypTree with RefTree with SelectFromTypeTreeApi
+ type SelectFromTypeTree >: Null <: SelectFromTypeTreeApi with TypTree with RefTree
/** The constructor/extractor for `SelectFromTypeTree` instances.
* @group Extractors
@@ -1935,7 +1935,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type CompoundTypeTree >: Null <: TypTree with CompoundTypeTreeApi
+ type CompoundTypeTree >: Null <: CompoundTypeTreeApi with TypTree
/** The constructor/extractor for `CompoundTypeTree` instances.
* @group Extractors
@@ -1965,7 +1965,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type AppliedTypeTree >: Null <: TypTree with AppliedTypeTreeApi
+ type AppliedTypeTree >: Null <: AppliedTypeTreeApi with TypTree
/** The constructor/extractor for `AppliedTypeTree` instances.
* @group Extractors
@@ -2007,7 +2007,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type TypeBoundsTree >: Null <: TypTree with TypeBoundsTreeApi
+ type TypeBoundsTree >: Null <: TypeBoundsTreeApi with TypTree
/** The constructor/extractor for `TypeBoundsTree` instances.
* @group Extractors
@@ -2044,7 +2044,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type ExistentialTypeTree >: Null <: TypTree with ExistentialTypeTreeApi
+ type ExistentialTypeTree >: Null <: ExistentialTypeTreeApi with TypTree
/** The constructor/extractor for `ExistentialTypeTree` instances.
* @group Extractors
@@ -2085,7 +2085,7 @@ trait Trees { self: Universe =>
* @group Trees
* @template
*/
- type TypeTree >: Null <: TypTree with TypeTreeApi
+ type TypeTree >: Null <: TypeTreeApi with TypTree
/** The constructor/extractor for `TypeTree` instances.
* @group Extractors
@@ -2313,7 +2313,7 @@ trait Trees { self: Universe =>
* @template
* @group Copying
*/
- type TreeCopier <: TreeCopierOps
+ type TreeCopier >: Null <: AnyRef with TreeCopierOps
/** The standard (lazy) tree copier.
* @group Copying
diff --git a/src/reflect/scala/reflect/api/Types.scala b/src/reflect/scala/reflect/api/Types.scala
index 4892b46e16..c45ef83a8a 100644
--- a/src/reflect/scala/reflect/api/Types.scala
+++ b/src/reflect/scala/reflect/api/Types.scala
@@ -59,7 +59,7 @@ trait Types {
* @template
* @group Types
*/
- type Type >: Null <: TypeApi
+ type Type >: Null <: AnyRef with TypeApi
/** This constant is used as a special value that indicates that no meaningful type exists.
* @group Types
@@ -256,7 +256,12 @@ trait Types {
* @template
* @group Types
*/
- type SingletonType >: Null <: Type
+ type SingletonType >: Null <: SingletonTypeApi with Type
+
+ /** Has no special methods. Is here to provides erased identity for `SingletonType`.
+ * @group API
+ */
+ trait SingletonTypeApi
/** A singleton type that describes types of the form on the left with the
* corresponding `ThisType` representation to the right:
@@ -266,7 +271,7 @@ trait Types {
* @template
* @group Types
*/
- type ThisType >: Null <: AnyRef with SingletonType with ThisTypeApi
+ type ThisType >: Null <: ThisTypeApi with SingletonType
/** The constructor/extractor for `ThisType` instances.
* @group Extractors
@@ -304,7 +309,7 @@ trait Types {
* @template
* @group Types
*/
- type SingleType >: Null <: AnyRef with SingletonType with SingleTypeApi
+ type SingleType >: Null <: SingleTypeApi with SingletonType
/** The constructor/extractor for `SingleType` instances.
* @group Extractors
@@ -343,7 +348,7 @@ trait Types {
* @template
* @group Types
*/
- type SuperType >: Null <: AnyRef with SingletonType with SuperTypeApi
+ type SuperType >: Null <: SuperTypeApi with SingletonType
/** The constructor/extractor for `SuperType` instances.
* @group Extractors
@@ -382,7 +387,7 @@ trait Types {
* @template
* @group Types
*/
- type ConstantType >: Null <: AnyRef with SingletonType with ConstantTypeApi
+ type ConstantType >: Null <: ConstantTypeApi with SingletonType
/** The constructor/extractor for `ConstantType` instances.
* @group Extractors
@@ -420,7 +425,7 @@ trait Types {
* @template
* @group Types
*/
- type TypeRef >: Null <: AnyRef with Type with TypeRefApi
+ type TypeRef >: Null <: TypeRefApi with Type
/** The constructor/extractor for `TypeRef` instances.
* @group Extractors
@@ -461,7 +466,12 @@ trait Types {
* @template
* @group Types
*/
- type CompoundType >: Null <: AnyRef with Type
+ type CompoundType >: Null <: CompoundTypeApi with Type
+
+ /** Has no special methods. Is here to provides erased identity for `CompoundType`.
+ * @group API
+ */
+ trait CompoundTypeApi
/** The `RefinedType` type defines types of any of the forms on the left,
* with their RefinedType representations to the right.
@@ -473,7 +483,7 @@ trait Types {
* @template
* @group Types
*/
- type RefinedType >: Null <: AnyRef with CompoundType with RefinedTypeApi
+ type RefinedType >: Null <: RefinedTypeApi with CompoundType
/** The constructor/extractor for `RefinedType` instances.
* @group Extractors
@@ -519,7 +529,7 @@ trait Types {
* @template
* @group Types
*/
- type ClassInfoType >: Null <: AnyRef with CompoundType with ClassInfoTypeApi
+ type ClassInfoType >: Null <: ClassInfoTypeApi with CompoundType
/** The constructor/extractor for `ClassInfoType` instances.
* @group Extractors
@@ -556,7 +566,7 @@ trait Types {
* @template
* @group Types
*/
- type MethodType >: Null <: AnyRef with Type with MethodTypeApi
+ type MethodType >: Null <: MethodTypeApi with Type
/** The constructor/extractor for `MethodType` instances.
* @group Extractors
@@ -600,7 +610,7 @@ trait Types {
* @template
* @group Types
*/
- type NullaryMethodType >: Null <: AnyRef with Type with NullaryMethodTypeApi
+ type NullaryMethodType >: Null <: NullaryMethodTypeApi with Type
/** The constructor/extractor for `NullaryMethodType` instances.
* @group Extractors
@@ -630,7 +640,7 @@ trait Types {
* @template
* @group Types
*/
- type PolyType >: Null <: AnyRef with Type with PolyTypeApi
+ type PolyType >: Null <: PolyTypeApi with Type
/** The constructor/extractor for `PolyType` instances.
* @group Extractors
@@ -664,7 +674,7 @@ trait Types {
* @template
* @group Types
*/
- type ExistentialType >: Null <: AnyRef with Type with ExistentialTypeApi
+ type ExistentialType >: Null <: ExistentialTypeApi with Type
/** The constructor/extractor for `ExistentialType` instances.
* @group Extractors
@@ -699,7 +709,7 @@ trait Types {
* @template
* @group Types
*/
- type AnnotatedType >: Null <: AnyRef with Type with AnnotatedTypeApi
+ type AnnotatedType >: Null <: AnnotatedTypeApi with Type
/** The constructor/extractor for `AnnotatedType` instances.
* @group Extractors
@@ -741,7 +751,7 @@ trait Types {
* @template
* @group Types
*/
- type TypeBounds >: Null <: AnyRef with Type with TypeBoundsApi
+ type TypeBounds >: Null <: TypeBoundsApi with Type
/** The constructor/extractor for `TypeBounds` instances.
* @group Extractors
@@ -792,7 +802,7 @@ trait Types {
* @template
* @group Types
*/
- type BoundedWildcardType >: Null <: AnyRef with Type with BoundedWildcardTypeApi
+ type BoundedWildcardType >: Null <: BoundedWildcardTypeApi with Type
/** The constructor/extractor for `BoundedWildcardType` instances.
* @group Extractors
diff --git a/src/reflect/scala/reflect/internal/AnnotationInfos.scala b/src/reflect/scala/reflect/internal/AnnotationInfos.scala
index d634034fe9..f42e0c44c9 100644
--- a/src/reflect/scala/reflect/internal/AnnotationInfos.scala
+++ b/src/reflect/scala/reflect/internal/AnnotationInfos.scala
@@ -75,7 +75,7 @@ trait AnnotationInfos extends api.Annotations { self: SymbolTable =>
* - arrays of constants
* - or nested classfile annotations
*/
- sealed abstract class ClassfileAnnotArg extends Product
+ sealed abstract class ClassfileAnnotArg extends Product with JavaArgumentApi
implicit val JavaArgumentTag = ClassTag[ClassfileAnnotArg](classOf[ClassfileAnnotArg])
case object UnmappableAnnotArg extends ClassfileAnnotArg
diff --git a/src/reflect/scala/reflect/internal/Names.scala b/src/reflect/scala/reflect/internal/Names.scala
index 73ce59feb2..ae9f2da4e5 100644
--- a/src/reflect/scala/reflect/internal/Names.scala
+++ b/src/reflect/scala/reflect/internal/Names.scala
@@ -535,7 +535,7 @@ trait Names extends api.Names {
}
// SYNCNOTE: caller to constructor must synchronize if `synchronizeNames` is enabled
- sealed abstract class TermName(index0: Int, len0: Int, hash: Int) extends Name(index0, len0) {
+ sealed abstract class TermName(index0: Int, len0: Int, hash: Int) extends Name(index0, len0) with TermNameApi {
type ThisNameType = TermName
protected[this] def thisName: TermName = this
val next: TermName = termHashtable(hash)
@@ -572,7 +572,7 @@ trait Names extends api.Names {
def unapply(name: TermName): Option[String] = Some(name.toString)
}
- sealed abstract class TypeName(index0: Int, len0: Int, hash: Int) extends Name(index0, len0) {
+ sealed abstract class TypeName(index0: Int, len0: Int, hash: Int) extends Name(index0, len0) with TypeNameApi {
type ThisNameType = TypeName
protected[this] def thisName: TypeName = this
diff --git a/src/reflect/scala/reflect/internal/Trees.scala b/src/reflect/scala/reflect/internal/Trees.scala
index 125146d9a2..2e35293f4a 100644
--- a/src/reflect/scala/reflect/internal/Trees.scala
+++ b/src/reflect/scala/reflect/internal/Trees.scala
@@ -597,7 +597,7 @@ trait Trees extends api.Trees {
def TypeBoundsTree(bounds: TypeBounds): TypeBoundsTree = TypeBoundsTree(TypeTree(bounds.lo), TypeTree(bounds.hi))
def TypeBoundsTree(sym: Symbol): TypeBoundsTree = atPos(sym.pos)(TypeBoundsTree(sym.info.bounds))
- override type TreeCopier <: InternalTreeCopierOps
+ override type TreeCopier >: Null <: InternalTreeCopierOps
abstract class InternalTreeCopierOps extends TreeCopierOps {
def ApplyDynamic(tree: Tree, qual: Tree, args: List[Tree]): ApplyDynamic
def ArrayValue(tree: Tree, elemtpt: Tree, trees: List[Tree]): ArrayValue
diff --git a/src/reflect/scala/reflect/internal/Types.scala b/src/reflect/scala/reflect/internal/Types.scala
index cf405ade03..d8c7682910 100644
--- a/src/reflect/scala/reflect/internal/Types.scala
+++ b/src/reflect/scala/reflect/internal/Types.scala
@@ -1055,7 +1055,7 @@ trait Types
/** A base class for types that represent a single value
* (single-types and this-types).
*/
- abstract class SingletonType extends SubType with SimpleTypeProxy {
+ abstract class SingletonType extends SubType with SimpleTypeProxy with SingletonTypeApi {
def supertype = underlying
override def isTrivial = false
override def widen: Type = underlying.widen
@@ -1323,7 +1323,7 @@ trait Types
/** A common base class for intersection types and class types
*/
- abstract class CompoundType extends Type {
+ abstract class CompoundType extends Type with CompoundTypeApi {
private[reflect] var baseTypeSeqCache: BaseTypeSeq = _
private[reflect] var baseTypeSeqPeriod = NoPeriod
diff --git a/test/files/run/compiler-asSeenFrom.scala b/test/files/run/compiler-asSeenFrom.scala
index 7020469bb2..61aa013696 100644
--- a/test/files/run/compiler-asSeenFrom.scala
+++ b/test/files/run/compiler-asSeenFrom.scala
@@ -2,9 +2,55 @@
* filter: inliner warning\(s\); re-run with -Yinline-warnings for details
*/
import scala.tools.nsc._
-import scala.tools.partest.CompilerTest
+import scala.tools.partest.DirectTest
import scala.collection.{ mutable, immutable, generic }
-import scala.language.postfixOps
+import scala.language.{postfixOps, implicitConversions}
+import scala.reflect.runtime.{universe => ru}
+
+// necessary to avoid bincompat with scala-partest compiled against the old compiler
+abstract class CompilerTest extends DirectTest {
+ def check(source: String, unit: global.CompilationUnit): Unit
+
+ lazy val global: Global = newCompiler()
+ lazy val units: List[global.CompilationUnit] = compilationUnits(global)(sources: _ *)
+ import global._
+ import definitions.{ compilerTypeFromTag }
+
+ override def extraSettings = "-feature -usejavacp -d " + testOutput.path
+
+ def show() = (sources, units).zipped foreach check
+
+ // Override at least one of these...
+ def code = ""
+ def sources: List[String] = List(code)
+
+ // Utility functions
+ class MkType(sym: Symbol) {
+ def apply[M](implicit t: ru.TypeTag[M]): Type =
+ if (sym eq NoSymbol) NoType
+ else appliedType(sym, compilerTypeFromTag(t))
+ }
+ implicit def mkMkType(sym: Symbol) = new MkType(sym)
+
+ def allMembers(root: Symbol): List[Symbol] = {
+ def loop(seen: Set[Symbol], roots: List[Symbol]): List[Symbol] = {
+ val latest = roots flatMap (_.info.members) filterNot (seen contains _)
+ if (latest.isEmpty) seen.toList.sortWith(_ isLess _)
+ else loop(seen ++ latest, latest)
+ }
+ loop(Set(), List(root))
+ }
+
+ class SymsInPackage(pkgName: String) {
+ def pkg = rootMirror.getPackage(pkgName)
+ def classes = allMembers(pkg) filter (_.isClass)
+ def modules = allMembers(pkg) filter (_.isModule)
+ def symbols = classes ++ terms filterNot (_ eq NoSymbol)
+ def terms = allMembers(pkg) filter (s => s.isTerm && !s.isConstructor)
+ def tparams = classes flatMap (_.info.typeParams)
+ def tpes = symbols map (_.tpe) distinct
+ }
+}
/** It's too messy but it's better than not having it.
*/
diff --git a/test/files/run/t7096.scala b/test/files/run/t7096.scala
index 2495102899..f36f99db95 100644
--- a/test/files/run/t7096.scala
+++ b/test/files/run/t7096.scala
@@ -3,6 +3,53 @@
*/
import scala.tools.partest._
import scala.tools.nsc._
+import scala.reflect.runtime.{universe => ru}
+import scala.language.implicitConversions
+
+// necessary to avoid bincompat with scala-partest compiled against the old compiler
+abstract class CompilerTest extends DirectTest {
+ def check(source: String, unit: global.CompilationUnit): Unit
+
+ lazy val global: Global = newCompiler()
+ lazy val units: List[global.CompilationUnit] = compilationUnits(global)(sources: _ *)
+ import global._
+ import definitions.{ compilerTypeFromTag }
+
+ override def extraSettings = "-usejavacp -d " + testOutput.path
+
+ def show() = (sources, units).zipped foreach check
+
+ // Override at least one of these...
+ def code = ""
+ def sources: List[String] = List(code)
+
+ // Utility functions
+ class MkType(sym: Symbol) {
+ def apply[M](implicit t: ru.TypeTag[M]): Type =
+ if (sym eq NoSymbol) NoType
+ else appliedType(sym, compilerTypeFromTag(t))
+ }
+ implicit def mkMkType(sym: Symbol) = new MkType(sym)
+
+ def allMembers(root: Symbol): List[Symbol] = {
+ def loop(seen: Set[Symbol], roots: List[Symbol]): List[Symbol] = {
+ val latest = roots flatMap (_.info.members) filterNot (seen contains _)
+ if (latest.isEmpty) seen.toList.sortWith(_ isLess _)
+ else loop(seen ++ latest, latest)
+ }
+ loop(Set(), List(root))
+ }
+
+ class SymsInPackage(pkgName: String) {
+ def pkg = rootMirror.getPackage(pkgName)
+ def classes = allMembers(pkg) filter (_.isClass)
+ def modules = allMembers(pkg) filter (_.isModule)
+ def symbols = classes ++ terms filterNot (_ eq NoSymbol)
+ def terms = allMembers(pkg) filter (s => s.isTerm && !s.isConstructor)
+ def tparams = classes flatMap (_.info.typeParams)
+ def tpes = symbols map (_.tpe) distinct
+ }
+}
object Test extends CompilerTest {
import global._
diff --git a/test/files/run/t8190.check b/test/files/run/t8190.check
new file mode 100644
index 0000000000..2362af7320
--- /dev/null
+++ b/test/files/run/t8190.check
@@ -0,0 +1,95 @@
+Annotation
+JavaArgument
+LiteralArgument
+ArrayArgument
+NestedArgument
+Constant
+Mirror
+Name
+TermName
+TypeName
+Position
+Scope
+MemberScope
+Symbol
+TermSymbol
+TypeSymbol
+MethodSymbol
+ModuleSymbol
+ClassSymbol
+FreeTermSymbol
+FreeTypeSymbol
+Type
+SingletonType
+ThisType
+SingleType
+SuperType
+ConstantType
+TypeRef
+CompoundType
+RefinedType
+ClassInfoType
+MethodType
+NullaryMethodType
+PolyType
+ExistentialType
+AnnotatedType
+TypeBounds
+BoundedWildcardType
+Tree
+TermTree
+TypTree
+SymTree
+NameTree
+RefTree
+DefTree
+MemberDef
+PackageDef
+ImplDef
+ClassDef
+ModuleDef
+ValOrDefDef
+ValDef
+DefDef
+TypeDef
+LabelDef
+ImportSelector
+Import
+Template
+Block
+CaseDef
+Alternative
+Star
+Bind
+UnApply
+Function
+Assign
+AssignOrNamedArg
+If
+Match
+Return
+Try
+Throw
+New
+Typed
+GenericApply
+TypeApply
+Apply
+Super
+This
+Select
+Ident
+ReferenceToBoxed
+Literal
+Annotated
+SingletonTypeTree
+SelectFromTypeTree
+CompoundTypeTree
+AppliedTypeTree
+TypeBoundsTree
+ExistentialTypeTree
+TypeTree
+Modifiers
+TreeCopier
+checking exhaustiveness in scala.reflect.api.Universe...
+uncovered type members: List()
diff --git a/test/files/run/t8190.scala b/test/files/run/t8190.scala
new file mode 100644
index 0000000000..f8abb73f15
--- /dev/null
+++ b/test/files/run/t8190.scala
@@ -0,0 +1,210 @@
+import scala.reflect.runtime.universe._
+
+trait Overloads {
+ // makes sure noone erases to Any or AnyRef
+ def test(x: AnyRef) = "AnyRef"
+ def test(x: Annotation) = "Annotation"
+ def test(x: JavaArgument) = "JavaArgument"
+ def test(x: LiteralArgument) = "LiteralArgument"
+ def test(x: ArrayArgument) = "ArrayArgument"
+ def test(x: NestedArgument) = "NestedArgument"
+ def test(x: Constant) = "Constant"
+ def test(x: Mirror) = "Mirror"
+ def test(x: Name) = "Name"
+ def test(x: TermName) = "TermName"
+ def test(x: TypeName) = "TypeName"
+ def test(x: Position) = "Position"
+ def test(x: Scope) = "Scope"
+ def test(x: MemberScope) = "MemberScope"
+ def test(x: Symbol) = "Symbol"
+ def test(x: TermSymbol) = "TermSymbol"
+ def test(x: TypeSymbol) = "TypeSymbol"
+ def test(x: MethodSymbol) = "MethodSymbol"
+ def test(x: ModuleSymbol) = "ModuleSymbol"
+ def test(x: ClassSymbol) = "ClassSymbol"
+ def test(x: FreeTermSymbol) = "FreeTermSymbol"
+ def test(x: FreeTypeSymbol) = "FreeTypeSymbol"
+ def test(x: Type) = "Type"
+ def test(x: SingletonType) = "SingletonType"
+ def test(x: ThisType) = "ThisType"
+ def test(x: SingleType) = "SingleType"
+ def test(x: SuperType) = "SuperType"
+ def test(x: ConstantType) = "ConstantType"
+ def test(x: TypeRef) = "TypeRef"
+ def test(x: CompoundType) = "CompoundType"
+ def test(x: RefinedType) = "RefinedType"
+ def test(x: ClassInfoType) = "ClassInfoType"
+ def test(x: MethodType) = "MethodType"
+ def test(x: NullaryMethodType) = "NullaryMethodType"
+ def test(x: PolyType) = "PolyType"
+ def test(x: ExistentialType) = "ExistentialType"
+ def test(x: AnnotatedType) = "AnnotatedType"
+ def test(x: TypeBounds) = "TypeBounds"
+ def test(x: BoundedWildcardType) = "BoundedWildcardType"
+ def test(x: Tree) = "Tree"
+ def test(x: TermTree) = "TermTree"
+ def test(x: TypTree) = "TypTree"
+ def test(x: SymTree) = "SymTree"
+ def test(x: NameTree) = "NameTree"
+ def test(x: RefTree) = "RefTree"
+ def test(x: DefTree) = "DefTree"
+ def test(x: MemberDef) = "MemberDef"
+ def test(x: PackageDef) = "PackageDef"
+ def test(x: ImplDef) = "ImplDef"
+ def test(x: ClassDef) = "ClassDef"
+ def test(x: ModuleDef) = "ModuleDef"
+ def test(x: ValOrDefDef) = "ValOrDefDef"
+ def test(x: ValDef) = "ValDef"
+ def test(x: DefDef) = "DefDef"
+ def test(x: TypeDef) = "TypeDef"
+ def test(x: LabelDef) = "LabelDef"
+ def test(x: ImportSelector) = "ImportSelector"
+ def test(x: Import) = "Import"
+ def test(x: Template) = "Template"
+ def test(x: Block) = "Block"
+ def test(x: CaseDef) = "CaseDef"
+ def test(x: Alternative) = "Alternative"
+ def test(x: Star) = "Star"
+ def test(x: Bind) = "Bind"
+ def test(x: UnApply) = "UnApply"
+ def test(x: Function) = "Function"
+ def test(x: Assign) = "Assign"
+ def test(x: AssignOrNamedArg) = "AssignOrNamedArg"
+ def test(x: If) = "If"
+ def test(x: Match) = "Match"
+ def test(x: Return) = "Return"
+ def test(x: Try) = "Try"
+ def test(x: Throw) = "Throw"
+ def test(x: New) = "New"
+ def test(x: Typed) = "Typed"
+ def test(x: GenericApply) = "GenericApply"
+ def test(x: TypeApply) = "TypeApply"
+ def test(x: Apply) = "Apply"
+ def test(x: Super) = "Super"
+ def test(x: This) = "This"
+ def test(x: Select) = "Select"
+ def test(x: Ident) = "Ident"
+ def test(x: ReferenceToBoxed) = "ReferenceToBoxed"
+ def test(x: Literal) = "Literal"
+ def test(x: Annotated) = "Annotated"
+ def test(x: SingletonTypeTree) = "SingletonTypeTree"
+ def test(x: SelectFromTypeTree) = "SelectFromTypeTree"
+ def test(x: CompoundTypeTree) = "CompoundTypeTree"
+ def test(x: AppliedTypeTree) = "AppliedTypeTree"
+ def test(x: TypeBoundsTree) = "TypeBoundsTree"
+ def test(x: ExistentialTypeTree) = "ExistentialTypeTree"
+ def test(x: TypeTree) = "TypeTree"
+ def test(x: Modifiers) = "Modifiers"
+ def test(x: TreeCopier) = "TreeCopier"
+}
+
+object Test extends App with Overloads {
+ val buf = scala.collection.mutable.ListBuffer[String]()
+ def record(result: String): Unit = {
+ println(result)
+ buf += result
+ }
+ def check(): Unit = {
+ println("checking exhaustiveness in scala.reflect.api.Universe...")
+ var types = typeOf[scala.reflect.api.Universe].members.filter(sym => sym.isType && !sym.isClass).map(_.name.toString)
+ types = types.filter(_ != "ModifiersCreator") // type ModifiersCreator = ModifiersExtractor
+ types = types.filter(_ != "FlagSet") // type FlagSet
+ types = types.filter(_ != "RuntimeClass") // type RuntimeClass = java.lang.Class[_]
+ val diff = types.toList diff buf.toList
+ println("uncovered type members: " + diff)
+ }
+ record(test(null: Annotation))
+ record(test(null: JavaArgument))
+ record(test(null: LiteralArgument))
+ record(test(null: ArrayArgument))
+ record(test(null: NestedArgument))
+ record(test(null: Constant))
+ record(test(null: Mirror))
+ record(test(null: Name))
+ record(test(null: TermName))
+ record(test(null: TypeName))
+ record(test(null: Position))
+ record(test(null: Scope))
+ record(test(null: MemberScope))
+ record(test(null: Symbol))
+ record(test(null: TermSymbol))
+ record(test(null: TypeSymbol))
+ record(test(null: MethodSymbol))
+ record(test(null: ModuleSymbol))
+ record(test(null: ClassSymbol))
+ record(test(null: FreeTermSymbol))
+ record(test(null: FreeTypeSymbol))
+ record(test(null: Type))
+ record(test(null: SingletonType))
+ record(test(null: ThisType))
+ record(test(null: SingleType))
+ record(test(null: SuperType))
+ record(test(null: ConstantType))
+ record(test(null: TypeRef))
+ record(test(null: CompoundType))
+ record(test(null: RefinedType))
+ record(test(null: ClassInfoType))
+ record(test(null: MethodType))
+ record(test(null: NullaryMethodType))
+ record(test(null: PolyType))
+ record(test(null: ExistentialType))
+ record(test(null: AnnotatedType))
+ record(test(null: TypeBounds))
+ record(test(null: BoundedWildcardType))
+ record(test(null: Tree))
+ record(test(null: TermTree))
+ record(test(null: TypTree))
+ record(test(null: SymTree))
+ record(test(null: NameTree))
+ record(test(null: RefTree))
+ record(test(null: DefTree))
+ record(test(null: MemberDef))
+ record(test(null: PackageDef))
+ record(test(null: ImplDef))
+ record(test(null: ClassDef))
+ record(test(null: ModuleDef))
+ record(test(null: ValOrDefDef))
+ record(test(null: ValDef))
+ record(test(null: DefDef))
+ record(test(null: TypeDef))
+ record(test(null: LabelDef))
+ record(test(null: ImportSelector))
+ record(test(null: Import))
+ record(test(null: Template))
+ record(test(null: Block))
+ record(test(null: CaseDef))
+ record(test(null: Alternative))
+ record(test(null: Star))
+ record(test(null: Bind))
+ record(test(null: UnApply))
+ record(test(null: Function))
+ record(test(null: Assign))
+ record(test(null: AssignOrNamedArg))
+ record(test(null: If))
+ record(test(null: Match))
+ record(test(null: Return))
+ record(test(null: Try))
+ record(test(null: Throw))
+ record(test(null: New))
+ record(test(null: Typed))
+ record(test(null: GenericApply))
+ record(test(null: TypeApply))
+ record(test(null: Apply))
+ record(test(null: Super))
+ record(test(null: This))
+ record(test(null: Select))
+ record(test(null: Ident))
+ record(test(null: ReferenceToBoxed))
+ record(test(null: Literal))
+ record(test(null: Annotated))
+ record(test(null: SingletonTypeTree))
+ record(test(null: SelectFromTypeTree))
+ record(test(null: CompoundTypeTree))
+ record(test(null: AppliedTypeTree))
+ record(test(null: TypeBoundsTree))
+ record(test(null: ExistentialTypeTree))
+ record(test(null: TypeTree))
+ record(test(null: Modifiers))
+ record(test(null: TreeCopier))
+ check()
+} \ No newline at end of file