final object ProtoTypes

Constructors

Members

@sharable final object AnyFunctionProto

A prototype for expressions [] that are known to be functions:

[] _

A prototype for expressions [] that are known to be functions:

[] _

[+] @sharable final object AnySelectionProto

A prototype for expressions [] that are in some unspecified selection operation

[].?: ?

Used to indicate that expression is in a context where the only vali...

A prototype for expressions [] that are in some unspecified selection operation

[].?: ?

Used to indicate that expression is in a context where the only valid operation is further selection. In this case, the expression need not be a value.

@sharable final object AnyTypeConstructorProto

A prototype for type constructors that are followed by a type application

A prototype for type constructors that are followed by a type application

trait ApplyingProto
@sharable final object AssignProto
class CachedViewProto
trait Compatibility

A trait defining an isCompatible method.

A trait defining an isCompatible method.

case class FunProto

A prototype for expressions that appear in function position

: resultType

A prototype for expressions that appear in function position

: resultType

final object FunProto

A prototype for expressions that appear in function position

: resultType

A prototype for expressions that appear in function position

: resultType

class FunProtoTyped

A prototype for expressions that appear in function position

: resultType, where args are known to be typed

A prototype for expressions that appear in function position

: resultType, where args are known to be typed

case class IgnoredProto

A class marking ignored prototypes that can be revealed by deepenProto

A class marking ignored prototypes that can be revealed by deepenProto

final object IgnoredProto

A class marking ignored prototypes that can be revealed by deepenProto

A class marking ignored prototypes that can be revealed by deepenProto

trait MatchAlways

A trait for prototypes that match all types

A trait for prototypes that match all types

final object NoViewsAllowed
case class PolyProto

A prototype for expressions [] that are type-parameterized:

[] [targs] resultType

A prototype for expressions [] that are type-parameterized:

[] [targs] resultType

final object PolyProto

A prototype for expressions [] that are type-parameterized:

[] [targs] resultType

A prototype for expressions [] that are type-parameterized:

[] [targs] resultType

abstract case class SelectionProto

A prototype for expressions [] that are part of a selection operation:

 [ ].name: proto

A prototype for expressions [] that are part of a selection operation:

 [ ].name: proto
final object SelectionProto
class UnapplyFunProto

A prototype for selections in pattern constructors

A prototype for selections in pattern constructors

abstract case class ViewProto

A prototype for implicitly inferred views:

[]: argType => resultType

A prototype for implicitly inferred views:

[]: argType => resultType

final object ViewProto
class WildApproxMap
final object dummyTreeOfType

Dummy tree to be used as an argument of a FunProto or ViewProto type

Dummy tree to be used as an argument of a FunProto or ViewProto type

[+] def constrained ( tl: TypeLambda , owningTree: Tree ) ( implicit ctx: Context ) : ( TypeLambda, List [ TypeTree ] )

Add all parameters of given type lambda tl to the constraint's domain. If the constraint contains already some of these parameters in its domain, make a...

Add all parameters of given type lambda tl to the constraint's domain. If the constraint contains already some of these parameters in its domain, make a copy of the type lambda and add the copy's type parameters instead. Return either the original type lambda, or the copy, if one was made. Also, if owningTree is non-empty, add a type variable for each parameter.

def constrained ( tl: TypeLambda ) ( implicit ctx: Context ) : TypeLambda

Same as constrained(tl, EmptyTree), but returns just the created type lambda

Same as constrained(tl, EmptyTree), but returns just the created type lambda

def newDepTypeParamRef ( tp: Type ) ( implicit ctx: Context ) : TypeParamRef

Create a new TypeParamRef that represents a dependent method parameter singleton

Create a new TypeParamRef that represents a dependent method parameter singleton

[+] def normalize ( tp: Type , pt: Type ) ( implicit ctx: Context ) : Type

The normalized form of a type - unwraps polymorphic types, tracking their parameters in the current constraint - skips implicit parameters; if result ty...

The normalized form of a type - unwraps polymorphic types, tracking their parameters in the current constraint - skips implicit parameters; if result type depends on implicit parameter, replace with Wildcard. - converts non-dependent method types to the corresponding function types - dereferences parameterless method types - dereferences nullary method types provided the corresponding function type is not a subtype of the expected type. Note: We need to take account of the possibility of inserting a () argument list in normalization. Otherwise, a type with a def toString(): String member would not count as a valid solution for ?{toString: String}. This would then lead to an implicit insertion, with a nice explosion of inference search because of course every implicit result has some sort of toString method. The problem is solved by dereferencing nullary method types if the corresponding function type is not compatible with the prototype.

def resultTypeApprox ( mt: MethodType ) ( implicit ctx: Context ) : Type

The result type of mt, where all references to parameters of mt are replaced by either wildcards (if typevarsMissContext) or TypeParamRefs.

The result type of mt, where all references to parameters of mt are replaced by either wildcards (if typevarsMissContext) or TypeParamRefs.

def selectionProto ( name: Name , tp: Type , typer: Typer ) ( implicit ctx: Context ) : WildcardType$ | SelectionProto

Create a selection proto-type, but only one level deep; treat constructors specially

Create a selection proto-type, but only one level deep; treat constructors specially

final def wildApprox ( tp: Type , theMap: WildApproxMap , seen: Set [ TypeParamRef ] ) ( implicit ctx: Context ) : Type

Approximate occurrences of parameter types and uninstantiated typevars by wildcard types.

Approximate occurrences of parameter types and uninstantiated typevars by wildcard types.