Inner function call only printed if the declaration of the inner function is made after the outer function #64
ArturAssisComp
started this conversation in
Bug
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Bug Description
We have a function called
factors, which, from anu64input, returns its prime factors as aVec<u64>. From the body of thefactorswe may call multiple times another function calledextract_all_p_factors, which was defined/declared in the same file.We have some unit tests for the
factorsfunction. Thus, from the unit tests, we callfactors, which callsextract_all_p_factors. The following calling tree would be expected for any input greater than 1:test-->factors-(+)->extract_all_p_factorsOBS.:
-(+)->indicates at least one callHowever, for some reason, depending on the order in which they are declared (
factorsandextract_all_p_factors), the VS code FireDBG GUI will not print eitherextract_all_p_factorscalls orfactorscall.factorscall:2. The following configuration does not print the
extract_all_p_factorscalls:The test which was used for the previous example is:
Trying to reproduce the bug
I am trying to reproduce the previous behavior but I could not yet. The following example works properly independent of the order in which the inner_function is declared:

Code used to try to reproduce the bug:
System Configuration
My system configuration is:
´´´
Version: 1.98.0 (user setup)
Commit: 6609ac3d66f4eade5cf376d1cb76f13985724bcb
Date: 2025-03-04T21:06:18.612Z
Electron: 34.2.0
ElectronBuildId: 11044223
Chromium: 132.0.6834.196
Node.js: 20.18.2
V8: 13.2.152.36-electron.0
OS: Windows_NT x64 10.0.26100
´´´
Complete Code
Beta Was this translation helpful? Give feedback.
All reactions