We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Structs that work and type check properly in a single file fail to work properly when imported. Reproducing example below:
Tested on commit 78169ab on master
# a.star StructA = record(val=str) StructB = record(a=StructA)
# b.star load("a.star", "StructA") load("a.star", "StructB") myB = StructB(a=StructA(val="foo")) print(myB)
# bNoImports.star StructA = record(val=str) StructB = record(a=StructA) myB = StructB(a=StructA(val="foo")) print(myB)
$ pwd /Users/simonzeng/repos/starlark-rust/starlark_bin $ cargo run -- bNoImports.star Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.08s Running `/Users/simonzeng/repos/starlark-rust/target/debug/starlark bNoImports.star` record[StructB](a=record[StructA](val="foo")) 1 files, 0 errors, 0 warnings, 0 advices, 0 disabled $ cargo run -- b.star Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.08s Running `/Users/simonzeng/repos/starlark-rust/target/debug/starlark b.star` Traceback (most recent call last): * b.star:3, in <module> myB = StructB(a=StructA(val="foo")) error: Value `record[StructA](val="foo")` of type `record` does not match the type annotation `StructA` for argument `a` --> b.star:3:7 | 3 | myB = StructB(a=StructA(val="foo")) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 1 files, 1 errors, 0 warnings, 0 advices, 0 disabled Error: Failed with 1 errors
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Structs that work and type check properly in a single file fail to work properly when imported. Reproducing example below:
Tested on commit 78169ab on master
The text was updated successfully, but these errors were encountered: