Skip to content

Inference also the "names" in a named tuple #547

Description

@dumblob
$ dao -e 'invar t: tuple<y:any,any> = ( y=0, 1 )'
= ( 0, 1 )

$ dao -e 'invar t: tuple<y:any,any> = ( 0, 1 )'
= ( 0, 1 )

$ dao -e 'invar t: tuple<any,any> = ( y=0, 1 )'
[[Exception::Error]] --- General Error:
name not matched
In code snippet:
      1 :  DATA_I      :     2 ,     1 ,     1 ;     1;   1
>>    2 :  TUPLE       :     0 ,     2 ,     2 ;     1;   ( y=0, 1 )
      3 :  SETVG       :     2 ,     0 ,     6 ;     1;   t: tuple<any,any> = ( y=...
Raised by:  __main__(), at instruction 2 in line 1 in file "MainNamespace";

Dao already casts like follows, so the error above is confusing.

$ dao -e 'invar x = ( y=0, 1 ); invar y = (tuple<a:int, b:int>)x'
= ( 0, 1 )

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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