Skip to content

No compile error with pointer to tuple of tuples in signature #371

@CastixGitHub

Description

@CastixGitHub

This code compiles:

(bind-alias my_type <i64,i64,double>*)
 (bind-func testing2:[my_type]* 100000
   (lambda ()
     (let ((outer:<my_type,my_type>* (zalloc)))
       (begin
         (let ((inner0:my_type (zalloc))
               (inner1:my_type (zalloc)))
           (tfill! inner0 0 1 3.3)
           (tfill! inner1 1 2 4.4)
           (tset! outer 0 inner0)
           (tset! outer 1 inner1))
         ;; what I get:                                                                                                                            
         (println "outer:" outer)
         outer))))
 ($ (let ((tested (testing2)))
      (println "tested:" tested)
      (println "try to get first element:" (tref tested 0))))

output:

Compiled:  testing2 >>> [<i64,i64,double>*]*                                                                                                  
outer: <<0,1,3.300000>,<1,2,4.400000>>
tested: <139962716578464,139962716578528,0.000000>                                                                                             
try to get first element: 139962716578464

It should be bind-func testing2:[<my_type,my_type>*]* as outer type, so I would expect a compilation error.
What's the meaning of <139962716578464,139962716578528,0.000000>?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions