io.github.iltotore.iron.macros
Members list
Type members
Classlikes
A FromExpr[Boolean] that can extract value from partially inlined || and && operations.
A FromExpr[Boolean] that can extract value from partially inlined || and && operations.
inline val x = true
val y: Boolean = ???
x || y //inlined to `true`
y || x //inlined to `true`
inline val a = false
val b: Boolean = ???
a && b //inlined to `false`
b && a //inlined to `false`
Attributes
- Supertypes
-
trait FromExpr[Boolean]class Objecttrait Matchableclass Any
- Self type
A FromExpr[String] that can extract value from concatenated strings if all arguments are compile-time-extractable strings.
A FromExpr[String] that can extract value from concatenated strings if all arguments are compile-time-extractable strings.
inline val x = "a"
inline val y = "b"
val z = "c"
x + y //"ab"
x + z //None
z + x //None
Attributes
- Supertypes
-
trait FromExpr[String]class Objecttrait Matchableclass Any
- Self type
Internal macros for intersection types
Internal macros for intersection types
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
intersection.type
Value members
Concrete methods
Asserts at compile time if the given condition is true.
Asserts at compile time if the given condition is true.
Type parameters
- A
-
the input type.
Value parameters
- cond
-
the tested condition. Should be evaluable at compile time.
- input
-
the tested input, used in the error message if the assertion fails.
- message
-
the message/description of this assertion.
Attributes
Checks if the given value is constant (aka evaluable at compile time).
Checks if the given value is constant (aka evaluable at compile time).
Type parameters
- A
-
the type of
value
.
Value parameters
- value
-
the value to test.
Attributes
- Returns
-
true
if the given value is constant,false
otherwise.
Givens
Givens
A FromExpr[Boolean] that can extract value from partially inlined || and && operations.
A FromExpr[Boolean] that can extract value from partially inlined || and && operations.
inline val x = true
val y: Boolean = ???
x || y //inlined to `true`
y || x //inlined to `true`
inline val a = false
val b: Boolean = ???
a && b //inlined to `false`
b && a //inlined to `false`
Attributes
A FromExpr[String] that can extract value from concatenated strings if all arguments are compile-time-extractable strings.
A FromExpr[String] that can extract value from concatenated strings if all arguments are compile-time-extractable strings.
inline val x = "a"
inline val y = "b"
val z = "c"
x + y //"ab"
x + z //None
z + x //None