Skip to content

Commit

Permalink
rename class.rs to class_parser.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbarabash committed Oct 11, 2023
1 parent 02a45ba commit fd761b6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions crates/escalier_hm/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5482,6 +5482,11 @@ fn infer_simple_class() -> Result<(), TypeError> {
checker.print_type(&t),
r#"{x: number, y: number, add(mut self, other: Self) -> Self}"#
);
let binding = my_ctx.values.get("Point").unwrap();
assert_eq!(
checker.print_type(&binding.index),
r#"{new fn(x: number, y: number) -> Self}"#
);

assert_no_errors(&checker)
}
Expand Down Expand Up @@ -5527,6 +5532,11 @@ fn infer_simple_class_and_param_types() -> Result<(), TypeError> {
checker.print_type(&t),
r#"{x: number, y: number, add(mut self, other: Self) -> Self}"#
);
let binding = my_ctx.values.get("Point").unwrap();
assert_eq!(
checker.print_type(&binding.index),
r#"{new fn(x: number, y: number) -> Self}"#
);

assert_no_errors(&checker)
}
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion crates/escalier_parser/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mod class;
mod class_parser;
mod expr_parser;
mod func_param;
mod jsx_parser;
Expand Down

0 comments on commit fd761b6

Please sign in to comment.