summary refs log tree commit diff stats
path: root/tests/fields/tfielditerator.nim
Commit message (Expand)AuthorAgeFilesLines
* use doAssert in tests (#16486)flywind2020-12-281-6/+6
* make tests green againAraq2019-05-271-3/+1
* Merge tests into a larger file (part 2 of ∞) (#9335)Miran2018-10-131-19/+87
* tests: Trim .nim files trailing whitespaceAdam Strzelecki2015-09-041-1/+1
* new tester; all tests categorizedAraq2014-01-131-0/+46
a id='n73' href='#n73'>73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
f='/ahoang/Nim/commit/tests/ccgbugs/tforward_decl_only.nim?h=devel&id=e2c2ae8e7e54ab333b578f707ac89c87c3390b4c'>e2c2ae8e7 ^




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

                                                             
                                    
                                                   












                                                                             













                                                          




                     
discard """
ccodecheck: "\\i !@('struct tyObject_MyRefObject'[0-z]+' {')"
ccodecheck: "\\i !@('mymoduleInit')"
ccodecheck: "\\i @('atmmymoduledotnim_DatInit000')"
output: "hello"
"""

# issue #7339 
# Test that MyRefObject is only forward declared as it used only by reference

import mymodule
type AnotherType = object
  f: MyRefObject 

let x = AnotherType(f: newMyRefObject("hello"))
echo $x.f


# bug #7363

type 
  Foo = object
    a: cint
  Foo2 = object
    b: cint

proc f(foo: ptr Foo, foo2: ptr Foo2): cint =
  if foo  != nil:  {.emit: "`result` = `foo`->a;".}
  if foo2 != nil: {.emit: [result, " = ", foo2[], ".b;"].}

discard f(nil, nil)


# bug #7392
var x1: BaseObj
var x2 = ChildObj(x1)