TP0205
Error: condition must be bool
Messages
Section titled “Messages”condition must be bool, found <T>(with helpconvert it with 'as bool'forpy)
Example
Section titled “Example”From the golden case tests/cases/m36/tp0205_comprehension.tpn:
# A comprehension's condition is a bool (SPEC §3.16).let xs = [1, 0, 2]print([x for x in xs if x])The compiler reports:
tp0205_comprehension.tpn:3:25: error TP0205: condition must be bool, found intThe specification lists every code.
© 2026 Discover Edge, LLC · Taipan is released under the MIT License.