A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://scala-lang.org/api/3.x/scala/compiletime/ops/any$.html below:

any

scala.compiletime.ops.any

Attributes
Source
any.scala
Graph
Supertypes
Self type
Members list

Inequality comparison of two singleton types.

Inequality comparison of two singleton types.

import compiletime.ops.any.*
val eq1: 1 != 1 = false
val eq2: 1 != "1" = true
val eq3: "1" != "1" = false
Attributes
Source
any.scala

Equality comparison of two singleton types.

Equality comparison of two singleton types.

import compiletime.ops.any.*
val eq1: 1 == 1 = true
val eq2: 1 == "1" = false
val eq3: "1" == "1" = true
Attributes
Source
any.scala

Tests if a type is a constant.

Tests if a type is a constant.

import compiletime.ops.any.*
val c1: IsConst[1] = true
val c2: IsConst["hi"] = true
val c3: IsConst[false] = true
val c4: IsConst[Any] = false

If the type is not yet known, then IsConst remains unevaluated, and will be evaluated only at its concrete type application. E.g.:

import compiletime.ops.any.*
//def `isConst`` returns the type `IsConst[X]`, since `X` is not yet known.
def isConst[X] : IsConst[X] = ???
val c5 : true = isConst[1] //now the type is known to be a constant
val c6 : false = isConst[Any] //now the type is known to be not a constant
Attributes
Source
any.scala

String conversion of a constant singleton type.

String conversion of a constant singleton type.

import compiletime.ops.any.*
val s1: ToString[1] = "1"
val sTrue: ToString[true] = "true"
Attributes
Source
any.scala

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4