diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-05-03 07:23:43 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-05-03 07:23:43 -0700 |
commit | e1666e62bc27c89a6ff529c308eacbad9d132e31 (patch) | |
tree | f14e67d197ff123a39a1a6fe63d1888b49170dbd /tests/012/buf.tl | |
parent | 49008cd459d87f7b38045bddf5a5bbd1c6f1a189 (diff) | |
download | txr-e1666e62bc27c89a6ff529c308eacbad9d132e31.tar.gz txr-e1666e62bc27c89a6ff529c308eacbad9d132e31.tar.bz2 txr-e1666e62bc27c89a6ff529c308eacbad9d132e31.zip |
compiler: bug: not warning bad uses of some local funs.
When a lexical function defined with flet or labels is
called with the wrong arguments, this is not being diagnosed
if that function is being lifted to load-time. This is because
the sys:load-time-lit that the lambda is wrapped with is not
propagating the pars attribute of the frag structure from
the lambda to its own returned frag.
* share/txr/stdlib/compiler.tl (compiler comp-load-time-lit):
After compiling the expression to obtain the exp frag, stuff
exp.pars to both the lt-frag that is generated, as well as to
the returned dummy frag carrying the dreg access that
retrieves the function. It's important for this returned frag
to carry the info, because from there it is propagated to the
function binding by comp-fbind by the (set bind.pars frag.pars)
expression.
Diffstat (limited to 'tests/012/buf.tl')
0 files changed, 0 insertions, 0 deletions