github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/testdata/reflect.txt (about)

     1  matching types
     2  true
     3  false
     4  false
     5  false
     6  false
     7  false
     8  
     9  values of interfaces
    10  reflect type: bool
    11    bool: true
    12  reflect type: bool
    13    bool: false
    14  reflect type: int
    15    int: 2000
    16  reflect type: int
    17    int: -2000
    18  reflect type: uint
    19    uint: 2000
    20  reflect type: int8
    21    int: -3
    22  reflect type: int8
    23    int: 3
    24  reflect type: uint8
    25    uint: 200
    26  reflect type: int16
    27    int: -300
    28  reflect type: int16
    29    int: 300
    30  reflect type: uint16
    31    uint: 50000
    32  reflect type: int32
    33    int: 7340032
    34  reflect type: int32
    35    int: -7340032
    36  reflect type: uint32
    37    uint: 7340032
    38  reflect type: int64
    39    int: 9895604649984
    40  reflect type: int64
    41    int: -9895604649984
    42  reflect type: uint64
    43    uint: 9895604649984
    44  reflect type: uintptr
    45    uint: 12345
    46  reflect type: float32
    47    float: +3.140000e+000
    48  reflect type: float64
    49    float: +3.140000e+000
    50  reflect type: complex64
    51    complex: (+1.200000e+000+3.000000e-001i)
    52  reflect type: complex128
    53    complex: (+1.300000e+000+4.000000e-001i)
    54  reflect type: int
    55    int: 32
    56  reflect type: string
    57    string: foo 3
    58    reflect type: uint8
    59      uint: 102
    60    reflect type: uint8
    61      uint: 111
    62    reflect type: uint8
    63      uint: 111
    64  reflect type: unsafe.Pointer
    65    pointer: true
    66  reflect type: chan
    67    chan: int
    68    nil: true
    69  reflect type: chan
    70    chan: int
    71    nil: true
    72  reflect type: ptr
    73    pointer: true int
    74    nil: false
    75    reflect type: int settable=true addrable=true
    76      int: 0
    77  reflect type: ptr
    78    pointer: true interface
    79    nil: false
    80    reflect type: interface settable=true addrable=true
    81      interface
    82      nil: true
    83  reflect type: ptr
    84    pointer: true int
    85    nil: false
    86    reflect type: int settable=true addrable=true
    87      int: 42
    88  reflect type: ptr
    89    pointer: true int
    90    nil: false
    91    reflect type: int settable=true addrable=true
    92      int: 0
    93  reflect type: slice comparable=false
    94    slice: uint8 3 3
    95    pointer: true
    96    nil: false
    97    indexing: 0
    98    reflect type: uint8 settable=true addrable=true
    99      uint: 1
   100    indexing: 1
   101    reflect type: uint8 settable=true addrable=true
   102      uint: 2
   103    indexing: 2
   104    reflect type: uint8 settable=true addrable=true
   105      uint: 3
   106  reflect type: slice comparable=false
   107    slice: uint8 2 5
   108    pointer: true
   109    nil: false
   110    indexing: 0
   111    reflect type: uint8 settable=true addrable=true
   112      uint: 0
   113    indexing: 1
   114    reflect type: uint8 settable=true addrable=true
   115      uint: 0
   116  reflect type: slice comparable=false
   117    slice: int32 2 2
   118    pointer: true
   119    nil: false
   120    indexing: 0
   121    reflect type: int32 settable=true addrable=true
   122      int: 3
   123    indexing: 1
   124    reflect type: int32 settable=true addrable=true
   125      int: 5
   126  reflect type: slice comparable=false
   127    slice: string 2 2
   128    pointer: true
   129    nil: false
   130    indexing: 0
   131    reflect type: string settable=true addrable=true
   132      string: xyz 3
   133      reflect type: uint8
   134        uint: 120
   135      reflect type: uint8
   136        uint: 121
   137      reflect type: uint8
   138        uint: 122
   139    indexing: 1
   140    reflect type: string settable=true addrable=true
   141      string: Z 1
   142      reflect type: uint8
   143        uint: 90
   144  reflect type: slice comparable=false
   145    slice: uint8 0 0
   146    pointer: false
   147    nil: true
   148  reflect type: slice comparable=false
   149    slice: uint8 0 0
   150    pointer: true
   151    nil: false
   152  reflect type: slice comparable=false
   153    slice: float32 2 2
   154    pointer: true
   155    nil: false
   156    indexing: 0
   157    reflect type: float32 settable=true addrable=true
   158      float: +1.000000e+000
   159    indexing: 1
   160    reflect type: float32 settable=true addrable=true
   161      float: +1.320000e+000
   162  reflect type: slice comparable=false
   163    slice: float64 2 2
   164    pointer: true
   165    nil: false
   166    indexing: 0
   167    reflect type: float64 settable=true addrable=true
   168      float: +1.000000e+000
   169    indexing: 1
   170    reflect type: float64 settable=true addrable=true
   171      float: +1.640000e+000
   172  reflect type: slice comparable=false
   173    slice: complex64 2 2
   174    pointer: true
   175    nil: false
   176    indexing: 0
   177    reflect type: complex64 settable=true addrable=true
   178      complex: (+1.000000e+000+0.000000e+000i)
   179    indexing: 1
   180    reflect type: complex64 settable=true addrable=true
   181      complex: (+1.640000e+000+3.000000e-001i)
   182  reflect type: slice comparable=false
   183    slice: complex128 2 2
   184    pointer: true
   185    nil: false
   186    indexing: 0
   187    reflect type: complex128 settable=true addrable=true
   188      complex: (+1.000000e+000+0.000000e+000i)
   189    indexing: 1
   190    reflect type: complex128 settable=true addrable=true
   191      complex: (+1.128000e+000+4.000000e-001i)
   192  reflect type: slice comparable=false
   193    slice: uint8 3 3
   194    pointer: true
   195    nil: false
   196    indexing: 0
   197    reflect type: uint8 settable=true addrable=true
   198      uint: 5
   199    indexing: 1
   200    reflect type: uint8 settable=true addrable=true
   201      uint: 3
   202    indexing: 2
   203    reflect type: uint8 settable=true addrable=true
   204      uint: 11
   205  reflect type: array
   206    array: 3 int64 24
   207    reflect type: int64
   208      int: 5
   209    reflect type: int64
   210      int: 8
   211    reflect type: int64
   212      int: 2
   213  reflect type: array
   214    array: 2 uint8 2
   215    reflect type: uint8
   216      uint: 3
   217    reflect type: uint8
   218      uint: 5
   219  reflect type: func comparable=false
   220    func
   221    nil: true
   222  reflect type: func comparable=false
   223    func
   224    nil: false
   225  reflect type: map comparable=false
   226    map
   227    nil: true
   228  reflect type: map comparable=false
   229    map
   230    nil: false
   231  reflect type: struct
   232    struct: 0
   233  reflect type: struct
   234    struct: 1
   235    field: 0 error
   236    pkg: main
   237    tag: ""
   238    embedded: true
   239    exported: false
   240    reflect type: interface caninterface=false
   241      interface
   242      nil: true
   243  reflect type: struct
   244    struct: 3
   245    field: 0 a
   246    pkg: main
   247    tag: ""
   248    embedded: false
   249    exported: false
   250    reflect type: uint8 caninterface=false
   251      uint: 42
   252    field: 1 b
   253    pkg: main
   254    tag: ""
   255    embedded: false
   256    exported: false
   257    reflect type: int16 caninterface=false
   258      int: 321
   259    field: 2 c
   260    pkg: main
   261    tag: ""
   262    embedded: false
   263    exported: false
   264    reflect type: int8 caninterface=false
   265      int: 123
   266  reflect type: struct comparable=false
   267    struct: 5
   268    field: 0 n
   269    pkg: main
   270    tag: "foo:\"bar\""
   271    embedded: false
   272    exported: false
   273    reflect type: int caninterface=false
   274      int: 5
   275    field: 1 some
   276    pkg: main
   277    tag: "some\x00tag"
   278    embedded: false
   279    exported: false
   280    reflect type: struct caninterface=false
   281      struct: 2
   282      field: 0 X
   283      pkg: 
   284      tag: ""
   285      embedded: false
   286      exported: true
   287      reflect type: int16 caninterface=false
   288        int: -5
   289      field: 1 Y
   290      pkg: 
   291      tag: ""
   292      embedded: false
   293      exported: true
   294      reflect type: int16 caninterface=false
   295        int: 3
   296    field: 2 zero
   297    pkg: main
   298    tag: ""
   299    embedded: false
   300    exported: false
   301    reflect type: struct caninterface=false
   302      struct: 0
   303    field: 3 buf
   304    pkg: main
   305    tag: ""
   306    embedded: false
   307    exported: false
   308    reflect type: slice caninterface=false comparable=false
   309      slice: uint8 2 2
   310      pointer: true
   311      nil: false
   312      indexing: 0
   313      reflect type: uint8 addrable=true caninterface=false
   314        uint: 71
   315      indexing: 1
   316      reflect type: uint8 addrable=true caninterface=false
   317        uint: 111
   318    field: 4 Buf
   319    pkg: 
   320    tag: ""
   321    embedded: false
   322    exported: true
   323    reflect type: slice comparable=false
   324      slice: uint8 1 1
   325      pointer: true
   326      nil: false
   327      indexing: 0
   328      reflect type: uint8 settable=true addrable=true
   329        uint: 88
   330  reflect type: ptr
   331    pointer: true struct
   332    nil: false
   333    reflect type: struct settable=true addrable=true
   334      struct: 2
   335      field: 0 next
   336      pkg: main
   337      tag: "description:\"chain\""
   338      embedded: false
   339      exported: false
   340      reflect type: ptr addrable=true caninterface=false
   341        pointer: false struct
   342        nil: true
   343      field: 1 foo
   344      pkg: main
   345      tag: ""
   346      embedded: false
   347      exported: false
   348      reflect type: int addrable=true caninterface=false
   349        int: 42
   350  reflect type: struct
   351    struct: 2
   352    field: 0 A
   353    pkg: 
   354    tag: ""
   355    embedded: false
   356    exported: true
   357    reflect type: uintptr
   358      uint: 2
   359    field: 1 B
   360    pkg: 
   361    tag: ""
   362    embedded: false
   363    exported: true
   364    reflect type: uintptr
   365      uint: 3
   366  reflect type: slice comparable=false
   367    slice: interface 3 3
   368    pointer: true
   369    nil: false
   370    indexing: 0
   371    reflect type: interface settable=true addrable=true
   372      interface
   373      nil: false
   374      reflect type: int
   375        int: 3
   376    indexing: 1
   377    reflect type: interface settable=true addrable=true
   378      interface
   379      nil: false
   380      reflect type: string
   381        string: str 3
   382        reflect type: uint8
   383          uint: 115
   384        reflect type: uint8
   385          uint: 116
   386        reflect type: uint8
   387          uint: 114
   388    indexing: 2
   389    reflect type: interface settable=true addrable=true
   390      interface
   391      nil: false
   392      reflect type: complex128
   393        complex: (-4.000000e+000+2.500000e+000i)
   394  reflect type: ptr
   395    pointer: true int8
   396    nil: false
   397    reflect type: int8 settable=true addrable=true
   398      int: 5
   399  reflect type: ptr
   400    pointer: true int16
   401    nil: false
   402    reflect type: int16 settable=true addrable=true
   403      int: -800
   404  reflect type: ptr
   405    pointer: true int32
   406    nil: false
   407    reflect type: int32 settable=true addrable=true
   408      int: 100000000
   409  reflect type: ptr
   410    pointer: true int64
   411    nil: false
   412    reflect type: int64 settable=true addrable=true
   413      int: -1000000000000
   414  reflect type: ptr
   415    pointer: true complex128
   416    nil: false
   417    reflect type: complex128 settable=true addrable=true
   418      complex: (-8.000000e+000-2.000000e+006i)
   419  
   420  sizes:
   421  int8 1 8
   422  int16 2 16
   423  int32 4 32
   424  int64 8 64
   425  uint8 1 8
   426  uint16 2 16
   427  uint32 4 32
   428  uint64 8 64
   429  float32 4 32
   430  float64 8 64
   431  complex64 8 64
   432  complex128 16 128
   433  offset for int64 matches: true
   434  offset for complex128 matches: true
   435  type assertion succeeded for unreferenced type
   436  
   437  alignment / offset:
   438  struct{[0]func(); byte}: true
   439  
   440  struct tags
   441  blue gopher
   442  
   443  v.Interface() method
   444  kind: interface
   445  int 5