~/bend-docscommunity

bolt/rules/suspicious/nat.bend fails

raw source on the hub · import 0x729eecea86ea5a2cdba3a2856a313bca/bolt/rules/suspicious/nat.bend as MNat

rule nat: a Nat literal (a number ending in n) of 1000 or more. Nat is unary: 4294967295n as an "infinity" or as fuel is four billion cells that eat all memory (rootagi, AppSprout, gavel), and a big literal overflows the checker's stack. Count in U32, or build the Nat at run time with U32.to_nat when it must be one.

5 imports
import Base
import ../../src.bend as Src
import ../../finding.bend as F
import ../../../syntax/lex.bend as Lex
import ../tokens.bend as T