cognate icon indicating copy to clipboard operation
cognate copied to clipboard

bug: some recursion is borken

Open dragoncoder047 opened this issue 10 months ago • 2 comments

Def F3 as (Error "Test error"; F3);
Def F2 as (F3; F2);
Def F1 as (F2; F1);
Def F0 as (F1; F0);
F0;

gets you an unreachable():

0   cognac                              0x0000000100ae81ac unreachable + 72
1   cognac                              0x0000000100ae8a4c resolve_early_use + 0
2   cognac                              0x0000000100af1804 main + 424
3   dyld                                0x0000000183dc8274 start + 2840

dragoncoder047 avatar Jan 23 '25 17:01 dragoncoder047

Looks like the issue is in add_arguments() assigning arguments to the function too optimistically.

StavromulaBeta avatar Jan 23 '25 17:01 StavromulaBeta

Minimum reproducible example

Def F3 as (F3);
Def F2 as (F3 ; F2);
F3;

StavromulaBeta avatar Jan 23 '25 17:01 StavromulaBeta