Skip to content
Snippets Groups Projects
Commit 0f54289a authored by Erwan Jahier's avatar Erwan Jahier
Browse files

Fix a bug in the fresh var names generation.

cf test/should_work/NONREG/fresh_name.lus

where the local variable _n1e1_1 was defined twice !

The fix contist the following idea : prefix fresh var name by "_",
   except if at least one user ident begins by "_". In that case, we
   try to prefix them by "_1", and then "_2", and so on. We take the
   first possible one.

   nb : this won't work if the user defined idents from "_1" to
   "_1073741823" (on 32-bits machine), but I bet that this compiler
   would die before anyway...
parent 0f5b381b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment