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
Stage-A: private functions with the same name in two modules collide in C #950
Importing two modules that each define a private function with the same name fails to compile.
Repro: a program that imports tests.fixtures.module_collision.module_a and tests.fixtures.module_collision.module_b (the fixture used by tests/integration/test_private_function_module_collision.py).
Observed: error: conflicting types for '_same' from clang.
Reproduce with the Stage-A compiler built from compiler/bootstrap/flowc_stage_a.c:
cc -O2 -o compiler/build/flowc_bootstrap compiler/bootstrap/flowc_stage_a.c
FLOWC_BUNDLE=1 FLOWC_DIR=. FLOWC_IN=repro.flow FLOWC_OUT=repro.c compiler/build/flowc_bootstrap
cc -O0 -o repro repro.c -lm && ./repro; echo $?
The Python host (./flow test-lang) handles the same program correctly.
Found while porting the Python run tests to tests/lang/. The Python test stays until this is fixed: tests/integration/test_private_function_module_collision.py.
Activity
fix(stage-a): rename colliding private functions across bundle modules
fix(stage-a): rename colliding private functions across bundle modules
fix(stage-a): bundle typecheck sees unexported functions of imports
fix(stage-a): bundle typecheck sees unexported functions of imports