Menu

#1739 Variables escape from their scope

closed-fixed
5
2013-05-25
2011-01-08
No

The attached file compiles. It shouldn't, because the variable "i" should be out of scope where it's used. Interestingly, removing either the "if" or the "while" around the "for" causes the proper error to appear!

Discussion

  • Christopher Head

    The failing source

     
  • Philipp Klaus Krause

    This could be related to bug #3190029, where the opposite problem occours: A local variable being visible only in part of it's scope.

     
  • Maarten Brock

    Maarten Brock - 2011-10-31
    • labels: 608414 --> C-Front End
     
  • Erik Petrich

    Erik Petrich - 2012-02-19

    Fixed in 3.1.2 #7331

     
  • Erik Petrich

    Erik Petrich - 2012-02-19
    • milestone: --> fixed
    • assigned_to: nobody --> epetrich
    • status: open --> closed-fixed
     

Log in to post a comment.