summary refs log tree commit diff stats
path: root/drnim/tests/tphi.nim
blob: 7ff49f4dc507da8f4dd8a63b659e61e7829152f7 (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
discard """
  nimout: '''tphi.nim(9, 10) Warning: BEGIN [User]
tphi.nim(22, 10) Warning: END [User]'''
  cmd: "drnim $file"
  action: "compile"
"""
import std/logic
{.push staticBoundChecks: defined(nimDrNim).}
{.warning: "BEGIN".}

proc testAsgn(y: int) =
  var a = y
  if a > 0:
    if a > 3:
      a = a + 2
    else:
      a = a + 1
    {.assert: a > 1.}

testAsgn(3)

{.warning: "END".}
{.pop.}