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



                         
 
                            

       
discard """
  errormsg: "type mismatch"
  line: 13
"""
{.experimental: "notnil".}
type
  PObj = ref TObj not nil
  TObj = object
    x: int

proc q2(x: string) = discard

q2(nil)