Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dumblob opened this issue Apr 13, 2019 · 1 comment
Open

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

dumblob opened this issue Apr 13, 2019 · 1 comment

Comments

@dumblob
Copy link

dumblob commented Apr 13, 2019

$ 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 )
@dumblob
Copy link
Author

dumblob commented Apr 13, 2019

It's also interesting, that there are already more issues somehow related to tuples 😉:
#355
#433
#438
#472
#430

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant