Literate
Literate copied to clipboard
Literate gives out-of-bounds error with certain code_types
With the "Hello World in C" example in the Literate manual, if I add an @code_type
declaration for many languages (ex., 'python', 'prolog', 'lisp'), I receive the following trace:
core.exception.RangeError@source/weaver.d(284): Range violation
----------------
??:? _d_arraybounds [0x56dfa3]
??:? weaver.__array [0x561873]
??:? immutable(char)[] weaver.weaveChapter(parser.Chapter, parser.Program, immutable(char)[][immutable(char)[]], immutable(char)[][][immutable(char)[]], immutable(char)[][][immutable(char)[]], immutable(char)[][][immutable(char)[]]) [0x55a8e9]
??:? void weaver.weave(parser.Program) [0x558f6f]
??:? void main.lit(immutable(char)[], immutable(char)[]) [0x50ae91]
??:? _Dmain [0x50c5b4]
??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x5700b2]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x570008]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x57006e]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x570008]
??:? _d_run_main [0x56ff65]
??:? main [0x50c6fb]
??:? __libc_start_main [0x782a8f44]
This does not happen with an @code_type
of c
, and indeed the program weaves fine that way.