trait
TypeAssigner
Members
The selection type, which is additionally checked for accessibility.
Type assignment method. Each method takes as parameters - an untpd.Tree to which it assigns a type, - typed child trees it needs to access to cpmpute th...
def
assignType
(
tree:
Super
,
qual:
Tree
,
inConstrCall:
Boolean
,
mixinClass:
Symbol
)
(
implicit
ctx:
Context
)
: Super
def
assignType
(
tree:
TypeApply
,
fn:
Tree
,
args:
List
[
Tree
]
)
(
implicit
ctx:
Context
)
: TypeApply
def
assignType
(
tree:
Block
,
stats:
List
[
Tree
]
,
expr:
Tree
)
(
implicit
ctx:
Context
)
: Block
def
assignType
(
tree:
Inlined
,
bindings:
List
[
Tree
]
,
expansion:
Tree
)
(
implicit
ctx:
Context
)
: Inlined
def
assignType
(
tree:
SeqLiteral
,
elems:
List
[
Tree
]
,
elemtpt:
Tree
)
(
implicit
ctx:
Context
)
: SeqLiteral
def
assignType
(
tree:
SingletonTypeTree
,
ref:
Tree
)
(
implicit
ctx:
Context
)
: SingletonTypeTree
def
assignType
(
tree:
AndTypeTree
,
left:
Tree
,
right:
Tree
)
(
implicit
ctx:
Context
)
: AndTypeTree
def
assignType
(
tree:
OrTypeTree
,
left:
Tree
,
right:
Tree
)
(
implicit
ctx:
Context
)
: OrTypeTree
def
assignType
(
tree:
RefinedTypeTree
,
parent:
Tree
,
refinements:
List
[
Tree
]
,
refineCls:
ClassSymbol
)
(
implicit
ctx:
Context
)
: RefinedTypeTree
Assign type of RefinedType.
Refinements are typed as if they were members of refinement class refineCls
.
def
assignType
(
tree:
AppliedTypeTree
,
tycon:
Tree
,
args:
List
[
Tree
]
)
(
implicit
ctx:
Context
)
: AppliedTypeTree
def
assignType
(
tree:
PolyTypeTree
,
tparamDefs:
List
[
TypeDef
]
,
body:
Tree
)
(
implicit
ctx:
Context
)
: PolyTypeTree
def
assignType
(
tree:
TypeBoundsTree
,
lo:
Tree
,
hi:
Tree
)
(
implicit
ctx:
Context
)
: TypeBoundsTree
def
assignType$default$4
: NoSymbol$
An upper approximation of the given type tp
that does not refer to any symbol in symsToAvoid
.
Approximation steps are:
- follow aliases and upper bounds if the original refers to a forbidden symbol
- widen termrefs that refer to a forbidden symbol
- replace ClassInfos of forbidden classes by the intersection of their parents, refined by all non-private fields, methods, and type members.
- if the prefix of a class refers to a forbidden symbol, first try to replace the prefix, if this is not possible, replace the ClassInfo as above.
- drop refinements referring to a forbidden symbol.
def
ensureAccessible
(
tpe:
Type
,
superAccess:
Boolean
,
pos:
Position
)
(
implicit
ctx:
Context
)
: Type
If tpe
is a named type, check that its denotation is accessible in the
current context. Return the type with those alternatives as denotations
which are...
def
qualifyingClass
(
tree:
Tree
,
qual:
Name
,
packageOK:
Boolean
)
(
implicit
ctx:
Context
)
: Symbol
The qualifying class of a this or super with prefix qual
(which might be empty).
The type of a selection with name
of a tree with type site
.