summary refs log tree commit diff stats
path: root/tests/ccgbugs/tissues.nim
blob: a0c402cc070f564d196486bb577c713f626335d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
discard """
action: compile
"""

# bug #2233
type MalType = object
  fun: proc: MalType

proc f(x: proc: MalType) =
  discard x()

f(nil)

# bug #2823

type A = object #of RootObj <-- Uncomment this to get no errors
  test: proc(i: A): bool
var a: proc(i: A): bool # Or comment this line to get no errors


# bug #2703
type
  fooObj[T] = object of RootObj
  bazObj[T] = object of fooObj[T]
    x: T

var troz: fooObj[string]
echo bazObj[string](troz).x


# bug #14880
type step = object
  exec: proc ()

const pipeline = @[step()]

let crash = pipeline[0]