@@ -115,17 +115,17 @@ package scala.tasty.reflect
115
115
trait Core {
116
116
117
117
/** Compilation context */
118
- type Context
118
+ type Context <: AnyRef
119
119
120
120
/** Settings */
121
- type Settings
121
+ type Settings <: AnyRef
122
122
123
123
// TODO: When bootstrapped, remove and use `Term | TypeTree` type directly in other files
124
124
/** Workaround missing `|` types in Scala 2 to represent `Term | TypeTree` */
125
- type TermOrTypeTree /* Term | TypeTree */
125
+ type TermOrTypeTree /* Term | TypeTree */ <: AnyRef
126
126
127
127
/** Tree representing code written in the source */
128
- type Tree
128
+ type Tree <: AnyRef
129
129
130
130
/** Tree representing a pacakage clause in the source code */
131
131
type PackageClause <: Tree
@@ -161,13 +161,13 @@ trait Core {
161
161
162
162
163
163
/** Branch of a pattern match or catch clause */
164
- type CaseDef
164
+ type CaseDef <: AnyRef
165
165
166
166
/** Branch of a type pattern match */
167
- type TypeCaseDef
167
+ type TypeCaseDef <: AnyRef
168
168
169
169
/** Pattern tree of the pattern part of a CaseDef */
170
- type Pattern
170
+ type Pattern <: AnyRef
171
171
172
172
/** Pattern representing a value. This includes `1`, ```x``` and `_` */
173
173
type Value <: Pattern
@@ -185,7 +185,7 @@ trait Core {
185
185
type TypeTest <: Pattern
186
186
187
187
/** Type tree representing a type or a bounds written in the source */
188
- type TypeOrBoundsTree
188
+ type TypeOrBoundsTree <: AnyRef
189
189
190
190
/** Type tree representing a type written in the source */
191
191
type TypeTree <: TypeOrBoundsTree
@@ -197,7 +197,7 @@ trait Core {
197
197
type TypeBoundsTree <: TypeOrBoundsTree
198
198
199
199
/** Type or bounds */
200
- type TypeOrBounds
200
+ type TypeOrBounds <: AnyRef
201
201
202
202
/** NoPrefix for a type selection */
203
203
type NoPrefix <: TypeOrBounds
@@ -231,24 +231,24 @@ trait Core {
231
231
* * RenameSelector: `.{bar => baz}` in `import foo.{bar => baz}`
232
232
* * OmitSelector: `.{bar => _}` in `import foo.{bar => _}`
233
233
*/
234
- type ImportSelector
234
+ type ImportSelector <: AnyRef
235
235
236
236
/** Untyped identifier */
237
- type Id
237
+ type Id <: AnyRef
238
238
239
239
/** JVM signature of a method */
240
- type Signature
240
+ type Signature <: AnyRef
241
241
242
242
/** Source position */
243
- type Position
243
+ type Position <: AnyRef
244
244
245
245
/** Constant value represented as the constant itself */
246
- type Constant
246
+ type Constant <: AnyRef
247
247
248
248
/** Symbol of a definition.
249
249
* Then can be compared with == to know if the definition is the same.
250
250
*/
251
- type Symbol
251
+ type Symbol <: AnyRef
252
252
253
253
/** Symbol of a package defnition */
254
254
type PackageSymbol <: Symbol
0 commit comments