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



                         
 
                            

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

proc q2(x: string) = discard

q2(nil)