Commit 94e8054
committed
Enable const tests for bool methods
This change re-enables the const tests for bool::then_some and bool::then
that were previously disabled with a FIXME comment referencing issue 110395.
The tests verify that these methods work correctly in const contexts, which
is important for compile-time evaluation. These tests check that both the
eager evaluation variant (then_some) and lazy evaluation variant (then)
can be used to create constant Option values at compile time.
Tests added:
- Const evaluation of false.then_some(0) returning None
- Const evaluation of true.then_some(0) returning Some(0)
- Const evaluation of false.then(zero) returning None
- Const evaluation of true.then(zero) returning Some(0)1 parent 8b6b15b commit 94e8054
1 file changed
+0
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
| |||
103 | 102 | | |
104 | 103 | | |
105 | 104 | | |
106 | | - | |
107 | 105 | | |
108 | 106 | | |
109 | 107 | | |
| |||
0 commit comments