summary refs log tree commit diff stats
path: root/tests/array/t15117.nim
blob: 157b04beec03c2d1280afd3314836302568683a3 (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
discard """
  matrix: "--cc:vcc"
  disabled: "linux"
  disabled: "bsd"
  disabled: "osx"
  disabled: "unix"
  disabled: "posix"
"""
{.experimental: "views".}

let a: array[0, byte] = []
discard a

type B = object
  a:int
let b: array[0, B] = []
let c: array[0, ptr B] = []
let d: array[0, ref B] = []
discard b
discard c
discard d

discard default(array[0, B])

type
  View1 = openArray[byte]
discard default(View1)