bolt/rules/correctness/foreign.bend fails
raw source on the hub · import 0x729eecea86ea5a2cdba3a2856a313bca/bolt/rules/correctness/foreign.bend as Foreign
rule foreign: a foreign def (its body only import "./x.c" / import
"./x.js" lines) with a body for one lane and not the other. Each lane
finds out only when it first runs: a native build (bend -o bin) fails
with "no .c import", an interpreted or JS run with "a foreign def without a
.js import". Give every foreign def both bodies, x.c and x.js. A file
headed # lanes: native never runs on the JS lane, so it needs no .js.
6 imports
import Base import ../../src.bend as Src import ../../finding.bend as F import ../../../syntax/lex.bend as Lex import ../../../syntax/tree.bend as Tree import ../../../syntax/bind.bend as Bind
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}