Skip to content

Commit c78bc37

Browse files
committed
[move book] update language version gate for __COMPILE_FOR_TESTING__
1 parent e2b00a5 commit c78bc37

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/content/docs/build/smart-contracts/book/constants.mdx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,16 @@ other expressions, will be added in the future.
121121

122122
## Builtin Constants
123123

124-
*Since language version 2.3*
125-
126124
Builtin constants are predefined named values which can be used from anywhere in the code. The following constants are supported:
127125

126+
*since language version 2.2*
127+
128+
| Name | Value |
129+
|---------------------------------|------------------------------------------------------|
130+
| `__COMPILE_FOR_TESTING__: bool` | `true` when compiling unit tests, `false` otherwise |
131+
132+
*since language version 2.3*
133+
128134
| Name | Value |
129135
|---------------------------------|------------------------------------------------------|
130136
| `MAX_U8: u8` | 2<sup>8</sup> - 1 |
@@ -145,7 +151,6 @@ Builtin constants are predefined named values which can be used from anywhere in
145151
| `MIN_I64: i64` | -2<sup>63</sup> |
146152
| `MIN_I128: i128` | -2<sup>127</sup> |
147153
| `MIN_I256: i256` | -2<sup>255</sup> |
148-
| `__COMPILE_FOR_TESTING__: bool` | `true` when compiling unit tests, `false` otherwise |
149154

150155
A builtin constant can be shadowed by a user declaration. For example, the below code is valid in language version 2.3, and the builtin constant will simply be shadowed:
151156

0 commit comments

Comments
 (0)