We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
IsConst
1 parent e675e77 commit 56938cfCopy full SHA for 56938cf
library/src/scala/compiletime/ops/any.scala
@@ -29,6 +29,15 @@ object any:
29
* val c1: IsConst[1] = true
30
* val c2: IsConst["hi"] = true
31
* val c3: IsConst[false] = true
32
+ * val c4: IsConst[Any] = false
33
+ * ```
34
+ * If the type is not yet known, then `IsConst` remains unevaluated, and
35
+ * will be evaluated only at its concrete type application. E.g.:
36
+ * ```scala
37
+ * //def `isConst`` returns the type `IsConst[X]`, since `X` is not yet known.
38
+ * def isConst[X] : IsConst[X] = ???
39
+ * val c5 : true = isConst[1] //now the type is known to be a constant
40
+ * val c6 : false = isConst[Any] //now the type is known to be not a constant
41
* ```
42
* @syntax markdown
43
*/
0 commit comments