Ticket #199 (closed defect: fixed)
Missing inout gets C# error message rather than Cobra error message.
Reported by: | torial | Owned by: | Chuck |
---|---|---|---|
Priority: | medium | Milestone: | |
Component: | Cobra Compiler | Version: | 0.8.0 |
Keywords: | error message | Cc: |
Description (last modified by Chuck) (diff)
If a call to a fxn that has inout parameters is made w/o the inout parameter, the C# equivalent message is given: "error: Argument "1" must be passed with the "ref" keyword" However, adding "ref" before argument 1 does not fix the issue, adding "inout" does.
%% args -ref:System.Xml -ref:System.Drawing use System.Windows.Forms #from "System.Windows.Forms" use System.Xml #from "System.Xml" use System.Text.RegularExpressions use System.Drawing class WordMatcher inherits Form cue init base.init .text = 'TMX Word Match Finder' .width = 800 .height = 600 list = List<of int>() .getList(list) #error: Argument "1" must be passed with the "ref" keyword .getList(inout list) #this compiles fine if above line is commented out. def getList(list as inout List<of int>) trace list class Program def main is shared has STAThread Application.run(WordMatcher())
Attachments
Change History
Note: See
TracTickets for help on using
tickets.