@@ -57,7 +57,7 @@ package object compiletime {
57
57
*/
58
58
transparent inline def code (inline args : Any * ): String =
59
59
// implemented in dotty.tools.dotc.typer.Inliner.Intrinsics
60
- error(" `code` was not evaluated by the compiler" )
60
+ error(" Compiler bug: `code` was not evaluated by the compiler" )
61
61
62
62
end extension
63
63
@@ -77,22 +77,22 @@ package object compiletime {
77
77
*/
78
78
inline def requireConst (inline x : Boolean | Byte | Short | Int | Long | Float | Double | Char | String ): Unit =
79
79
// implemented in dotty.tools.dotc.typer.Inliner
80
- error(" `requireConst` was not evaluated by the compiler" )
80
+ error(" Compiler bug: `requireConst` was not evaluated by the compiler" )
81
81
82
82
/** Same as `constValue` but returns a `None` if a constant value
83
83
* cannot be constructed from the provided type. Otherwise returns
84
84
* that value wrapped in `Some`.
85
85
*/
86
86
inline def constValueOpt [T ]: Option [T ] =
87
87
// implemented in dotty.tools.dotc.typer.Inliner
88
- error(" `constValueOpt` was not evaluated by the compiler" )
88
+ error(" Compiler bug: `constValueOpt` was not evaluated by the compiler" )
89
89
90
90
/** Given a constant, singleton type `T`, convert it to a value
91
91
* of the same singleton type. For example: `assert(constValue[1] == 1)`.
92
92
*/
93
93
inline def constValue [T ]: T =
94
94
// implemented in dotty.tools.dotc.typer.Inliner
95
- error(" `constValue` was not evaluated by the compiler" )
95
+ error(" Compiler bug: `constValue` was not evaluated by the compiler" )
96
96
97
97
/** Given a tuple type `(X1, ..., Xn)`, returns a tuple value
98
98
* `(constValue[X1], ..., constValue[Xn])`.
@@ -120,7 +120,7 @@ package object compiletime {
120
120
* the returned value would be `2`.
121
121
*/
122
122
transparent inline def summonFrom [T ](f : Nothing => T ): T =
123
- error(" `summonFrom` was not evaluated by the compiler" )
123
+ error(" Compiler bug: `summonFrom` was not evaluated by the compiler" )
124
124
125
125
/** Summon a given value of type `T`. Usually, the argument is not passed explicitly.
126
126
* The summoning is delayed until the call has been fully inlined.
0 commit comments