You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CID scanning rewrites suffixes of legal host identifiers #1712
The effect scanner's ASCII word boundary treats CID inside legal host identifiers as the CID macro. On e5527d5, calling $CID(20) or πCID(20) fails compilation with Error: CID(20) names no constructor or def. JavaScript private #CID and identifiers containing a joiner have the same problem.
The patch requires a complete host identifier token, including Unicode ID_Continue, dollar, private-name and join-control boundaries. Comments and literals keep the existing scanner behavior; this is separate from #1604/#1653's line-continuation fix.
Real behavior proof: tests/io/effect_identifier_boundary.bend fails before in both C and JS builds. Afterward the actual native executable and Bun script each print 42. The JS program exercises dollar, Greek, private and joiner identifiers; the C program exercises dollar and Greek identifiers. Real CID(answer) registration still works.
Commands: bun bend2/main.ts tests/io/effect_identifier_boundary.bend -o boundary; ./boundary --threads 1 --gpu off; bun bend2/main.ts tests/io/effect_identifier_boundary.bend -o boundary.js; bun boundary.js.
# CID is a macro token, not a suffix of a legal host identifier.
import Base
def answer() -> IO(U32):
import "./effect_identifier_boundary.c"
import "./effect_identifier_boundary.js"
def main() -> IO(Unit):
do IO<Unit>:
value : U32 <- answer()
IO.print(U32.show(value))
#|42
Activity