summary refs log tree commit diff stats
path: root/tests/notnil/tnotnil.nim
blob: c33b6fcac65146920c7253026e41d66d223fcd9c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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)