Wiki

root/cobra/trunk/Tests/100-basics/706-print-errors.cobra

Revision 2380, 272 bytes (checked in by Chuck.Esterbrook, 2 years ago)

Improved error checking for statement regarding expressions that don't have a return type.

  • Property svn:eol-style set to native
Line 
1class X
2
3    def returnsNothing
4        pass
5   
6    def main
7        i = 5
8        print to i, 'x'  # .error. invalid destination
9        print to Object(), 'x'  # .error. invalid destination
10        print to i  # .error. invalid destination
11            print 'hi'
12        print .returnsNothing  # .error. cannot be printed
Note: See TracBrowser for help on using the browser.