P package

scala.compiletime

extends Object with Serializable

Supertypes

Object, Serializable

Members

type 

S

 = Nothing <: Int

Succesor of a natural number where zero is the type 0 and successors are reduced as if the definition was

type S[N <: Int] <: Int = N match { case 0 => 1 c...

Succesor of a natural number where zero is the type 0 and successors are reduced as if the definition was

type S[N <: Int] <: Int = N match { case 0 => 1 case 1 => 2 case 2 => 3 ... case 2147483646 => 2147483647 }

def 

byName

[T] ( x: => T ) : T

Assertion that an argument is by-name. Used for nullability checking.

Assertion that an argument is by-name. Used for nullability checking.

inline def 

code

( self: => StringContext ) ( args: => [Any] ) : String

Returns the string representations for code passed in the interpolated values

Returns the string representations for code passed in the interpolated values

inline def logged(p1: => Any) = {
  val c = code"code: $p1"
  val res = p1
  (c, p1)
}
logged(indentity("foo"))

is equivalent to:

("code: indentity("foo")", indentity("foo"))
inline def 

constValue

[T] : T

inline def 

constValueOpt

[T] : Option[T]

erased def 

erasedValue

[T] : T

inline def 

error

( msg: String ) : Nothing

The error method is used to produce user-defined compile errors during inline expansion. If an inline expansion results in a call error(msgStr) the com...

The error method is used to produce user-defined compile errors during inline expansion. If an inline expansion results in a call error(msgStr) the compiler produces an error message containing the given msgStr.

error("My error message")

or

error(code"My error of this code: ${println("foo")}")
inline def 

summonFrom

[T] ( f: Nothing => T ) : T

Summons first given matching one of the listed cases. E.g. in

given B { ... }

summonFrom { case given A => 1 case given B => 2 case given C => 3 case _ => 4

Summons first given matching one of the listed cases. E.g. in

given B { ... }

summonFrom { case given A => 1 case given B => 2 case given C => 3 case _ => 4 }

the returned value would be 2.

inline def 

summonInline

[T] : T

Summon a given value of type T. Usually, the argument is not passed explicitly. The summoning is delayed until the call has been fully inlined.

Summon a given value of type T. Usually, the argument is not passed explicitly. The summoning is delayed until the call has been fully inlined.