summary refs log tree commit diff stats
path: root/tests/vm/tsimpleglobals.nim
blob: 7ab665070e4b02df4ab0d41556cc20b445914e21 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
discard """
  nimout: "abc xyz bb"
"""

# bug #2473
type
  Test = tuple[a,b: string]

static:
  var s:seq[Test] = @[(a:"a", b:"b")]
  s[0] = (a:"aa", b:"bb")

  var x: Test
  x.a = "abc"
  x.b = "xyz"
  echo x.a, " ", x.b, " ", s[0].b
await recvLine(fd) var foo = line[0] if foo == 'g': raise newException(Exception, "foobar") proc serve() {.async.} = while true: var fut = await accept() await processClient(fut) when true: proc main = var fut = serve() fut.callback = proc () = if fut.failed: # This test ensures that this exception crashes the application # as it is not handled. raise fut.error runForever() main()