Boo
  1. Boo
  2. BOO-1330

booish doesn't support passing global variables by reference

    Details

    • Type: Improvement Improvement
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.9.4
    • Fix Version/s: None
    • Component/s: Command line tools
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Local variables are still supported though.

      >>>def dobyref(ref x as int):
      ...    x = 4
      ...    
      >>>x = 1
      1
      >>>dobyref(x)
      ----------^
      ERROR: The best overload for the method 'Input2Module.dobyref(ref int)' is not compatible with the argument list '(int)'.
      >>>// workaround
      >>>{ y = x; dobyref(y); x = y }() // local closure variable y can be passed by ref just fine      
      >>>x
      4
      

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Rodrigo B. de Oliveira
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: