Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow STATE variables being GLOBAL #1723

Merged
merged 2 commits into from
Mar 23, 2022
Merged

Disallow STATE variables being GLOBAL #1723

merged 2 commits into from
Mar 23, 2022

Conversation

pramodk
Copy link
Member

@pramodk pramodk commented Mar 23, 2022

 * state variables can not be global, see
   #1479 (comment)
 * before code generation iterate through all
   symbols and error if there is any state variable
   declared as global.
Copy link
Collaborator

@olupton olupton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; I assume you checked this on cadecay.mod.

@pramodk
Copy link
Member Author

pramodk commented Mar 23, 2022

Yes, it will give error like:

cai is as a STATE variable and hence cannot be declared as GLOBAL at line 130 in file /..../some-dir/test.mod
^

@codecov-commenter
Copy link

Codecov Report

Merging #1723 (d39220a) into master (6953929) will increase coverage by 0.00%.
The diff coverage is 85.71%.

@@           Coverage Diff           @@
##           master    #1723   +/-   ##
=======================================
  Coverage   45.30%   45.30%           
=======================================
  Files         551      551           
  Lines      111206   111213    +7     
=======================================
+ Hits        50380    50386    +6     
- Misses      60826    60827    +1     
Impacted Files Coverage Δ
src/nmodl/nocpout.cpp 93.60% <83.33%> (-0.04%) ⬇️
src/nmodl/modl.cpp 64.42% <100.00%> (+0.34%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@pramodk pramodk merged commit 6f666ac into master Mar 23, 2022
pramodk added a commit to ModelDBRepository/2487 that referenced this pull request May 23, 2022
pramodk added a commit to ModelDBRepository/2730 that referenced this pull request May 23, 2022
pramodk added a commit to ModelDBRepository/64296 that referenced this pull request May 23, 2022
pramodk added a commit to ModelDBRepository/2733 that referenced this pull request May 23, 2022
pramodk added a commit to ModelDBRepository/64229 that referenced this pull request May 23, 2022
pramodk added a commit to ModelDBRepository/93321 that referenced this pull request May 23, 2022
pramodk added a commit to ModelDBRepository/116094 that referenced this pull request May 23, 2022
pramodk added a commit to ModelDBRepository/149739 that referenced this pull request May 23, 2022
pramodk added a commit to ModelDBRepository/232097 that referenced this pull request May 23, 2022
ramcdougal pushed a commit to ModelDBRepository/2487 that referenced this pull request May 27, 2022
ramcdougal pushed a commit to ModelDBRepository/2730 that referenced this pull request May 27, 2022
ramcdougal pushed a commit to ModelDBRepository/2733 that referenced this pull request May 27, 2022
ramcdougal pushed a commit to ModelDBRepository/64229 that referenced this pull request May 27, 2022
ramcdougal pushed a commit to ModelDBRepository/64296 that referenced this pull request May 27, 2022
ramcdougal pushed a commit to ModelDBRepository/93321 that referenced this pull request May 27, 2022
ramcdougal pushed a commit to ModelDBRepository/116094 that referenced this pull request May 27, 2022
ramcdougal pushed a commit to ModelDBRepository/149739 that referenced this pull request May 27, 2022
ramcdougal pushed a commit to ModelDBRepository/232097 that referenced this pull request May 27, 2022
@alexsavulescu alexsavulescu mentioned this pull request Jun 29, 2022
19 tasks
@alexsavulescu alexsavulescu deleted the pramodk/state-global branch July 20, 2022 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants