bolt/rules/correctness/put.bend fails
raw source on the hub · import 0x729eecea86ea5a2cdba3a2856a313bca/bolt/rules/correctness/put.bend as Put
rule put: a call to Map.put(. Base's Map.put is an internal helper of
Map.set: on a leaf it keeps the old key and replaces the value without
comparing keys, so putting a new key silently overwrites another entry
(bend-http c91bdf8: "b" into a map of "a" replaced "a"). Use Map.set. A
file that defines Map.put itself (Base's source) is exempt.
6 imports
import Base import ../../src.bend as Src import ../../../lazy/lazy.bend as Lazy import ../../finding.bend as F import ../../../syntax/lex.bend as Lex import ../tokens.bend as T
The reader could not load this file (at 0x729eecea86ea5a2cdba3a2856a313bca/bolt/config.bend:31). What bend.ts says:
Error:
- expected : a fresh name (duplicate declaration: Set)
- observed : 'Set'
Location:
30 | # a name (a group's or a rule's) at a level
31>| type Set is Data:
| ^^^
32 | Set{name: String, level: Level}