summary refs log blame commit diff stats
path: root/tests/discard/tneedsdiscard.nim
blob: 8d59e7fec09de955a2d76995402fb15c3ece9628 (plain) (tree)
1
2
3
4
5
6
7
8
9

           
                                                                                                                                                          


        
             
           
 
                    
 
   
discard """
  line: 10
  errormsg: '''expression 'open(f, "arg.txt", fmRead, -1)' is of type 'bool' and has to be discarded; start of expression here: tneedsdiscard.nim(7, 2)'''
"""

proc p =
  var f: File
  echo "hi"

  open(f, "arg.txt")

p()