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-commenter commented Mar 23, 2022

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 45.30%. Comparing base (6953929) to head (d39220a).
Report is 1811 commits behind head on master.

Files with missing lines Patch % Lines
src/nmodl/nocpout.cpp 83.33% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1723   +/-   ##
=======================================
  Coverage   45.30%   45.30%           
=======================================
  Files         551      551           
  Lines      111206   111213    +7     
=======================================
+ Hits        50380    50386    +6     
- Misses      60826    60827    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@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