feat: add self keyword to import a module
this PR fixes #7279
hey @orizi, when running the tests, I'm getting failures because the tests are expecting the original behavior (where self is not recognized as a keyword). I believe I need to run with CAIRO_FIX_TESTS=1 to update the test expectations, did that and i'm still getting the same error message
failures:
---- expr::test::expr_semantics::use_ stdout ----
thread 'expr::test::expr_semantics::use_' panicked at crates/cairo-lang-test-utils/src/parse_test_file.rs:467:5:
Test "Test self keyword in module imports" failed.
In /Users/g4titan/cairo/crates/cairo-lang-semantic/src/expr/semantic_test_data/use:1521.
`expect_diagnostics` is false, but diagnostics were generated:
Test "Test self keyword with nested modules" failed.
In /Users/g4titan/cairo/crates/cairo-lang-semantic/src/expr/semantic_test_data/use:1579.
`expect_diagnostics` is false, but diagnostics were generated:
Test "Test enum with self keyword" failed.
In /Users/g4titan/cairo/crates/cairo-lang-semantic/src/expr/semantic_test_data/use:1643.
`expect_diagnostics` is false, but diagnostics were generated:
Summary: 30 passed, 3 failed:
test_expr_semantics::use::"Test self keyword in module imports" (line: 1521)
test_expr_semantics::use::"Test self keyword with nested modules" (line: 1579)
test_expr_semantics::use::"Test enum with self keyword" (line: 1643)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
expr::test::expr_semantics::use_
test result: FAILED. 97 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 4.69s
error: test failed, to rerun pass `-p cairo-lang-semantic --lib`
okay done @orizi test passed
Reviewable status: 1 of 3 files reviewed, 6 unresolved discussions (waiting on @g4titanx)
a discussion (no related file): if you aren't really planning on solving this - please close PR and remove yourself from the github assignment.
hey i plan to and i'm gonna finish it today