diff --git a/crates/tinymist-query/src/fixtures/post_type_check/snaps/test@text_font2.typ.snap b/crates/tinymist-query/src/fixtures/post_type_check/snaps/test@text_font2.typ.snap index 099be546f..f24f0ecce 100644 --- a/crates/tinymist-query/src/fixtures/post_type_check/snaps/test@text_font2.typ.snap +++ b/crates/tinymist-query/src/fixtures/post_type_check/snaps/test@text_font2.typ.snap @@ -1,8 +1,8 @@ --- source: crates/tinymist-query/src/analysis.rs description: "Check on \"(\" (30)" -expression: literal_type +expression: post_ty input_file: crates/tinymist-query/src/fixtures/post_type_check/text_font2.typ snapshot_kind: text --- -TextFont +( ⪰ "Test" ⪯ TextFont) diff --git a/crates/tinymist-query/src/fixtures/post_type_check/snaps/test@text_font4.typ.snap b/crates/tinymist-query/src/fixtures/post_type_check/snaps/test@text_font4.typ.snap index eb7536771..ac620bc56 100644 --- a/crates/tinymist-query/src/fixtures/post_type_check/snaps/test@text_font4.typ.snap +++ b/crates/tinymist-query/src/fixtures/post_type_check/snaps/test@text_font4.typ.snap @@ -1,8 +1,8 @@ --- source: crates/tinymist-query/src/analysis.rs description: "Check on \"(\" (31)" -expression: literal_type +expression: post_ty input_file: crates/tinymist-query/src/fixtures/post_type_check/text_font4.typ snapshot_kind: text --- -TextFont +( ⪰ "Test" ⪯ TextFont) diff --git a/crates/tinymist-query/src/fixtures/post_type_check/snaps/test@text_font_element4.typ.snap b/crates/tinymist-query/src/fixtures/post_type_check/snaps/test@text_font_element4.typ.snap index 0bc9ddf8e..1b23dc0c7 100644 --- a/crates/tinymist-query/src/fixtures/post_type_check/snaps/test@text_font_element4.typ.snap +++ b/crates/tinymist-query/src/fixtures/post_type_check/snaps/test@text_font_element4.typ.snap @@ -1,8 +1,8 @@ --- source: crates/tinymist-query/src/analysis.rs description: "Check on \"\\\"Test\\\"\" (31)" -expression: literal_type +expression: post_ty input_file: crates/tinymist-query/src/fixtures/post_type_check/text_font_element4.typ snapshot_kind: text --- -TextFont +( ⪰ "Test" ⪯ TextFont) diff --git a/crates/tinymist-query/src/fixtures/post_type_check/snaps/test@user_func.typ.snap b/crates/tinymist-query/src/fixtures/post_type_check/snaps/test@user_func.typ.snap index 1f417aa27..086ddf58b 100644 --- a/crates/tinymist-query/src/fixtures/post_type_check/snaps/test@user_func.typ.snap +++ b/crates/tinymist-query/src/fixtures/post_type_check/snaps/test@user_func.typ.snap @@ -1,8 +1,8 @@ --- source: crates/tinymist-query/src/analysis.rs description: "Check on \"(\" (105)" -expression: literal_type +expression: post_ty input_file: crates/tinymist-query/src/fixtures/post_type_check/user_func.typ snapshot_kind: text --- -TextFont +( ⪰ TextFont ⪯ "Test") diff --git a/crates/tinymist-query/src/fixtures/type_check/snaps/test@tuple_map.typ.snap b/crates/tinymist-query/src/fixtures/type_check/snaps/test@tuple_map.typ.snap index 4e3cc4e85..c5200504d 100644 --- a/crates/tinymist-query/src/fixtures/type_check/snaps/test@tuple_map.typ.snap +++ b/crates/tinymist-query/src/fixtures/type_check/snaps/test@tuple_map.typ.snap @@ -7,7 +7,7 @@ snapshot_kind: text "a" = (1, ) "f" = ((Type(bytes) | Type(decimal) | Type(float) | Type(int) | Type(label) | Type(str) | Type(type) | Type(version))) => Type(str) "" = ((Type(bytes) | Type(decimal) | Type(float) | Type(int) | Type(label) | Type(str) | Type(type) | Type(version))) => Type(str) -"x" = Any +"x" = Type(int) "b" = (Type(str), ) ===== 5..6 -> @a diff --git a/crates/tinymist-query/src/ty/def.rs b/crates/tinymist-query/src/ty/def.rs index 56718c20d..2e572f496 100644 --- a/crates/tinymist-query/src/ty/def.rs +++ b/crates/tinymist-query/src/ty/def.rs @@ -777,7 +777,7 @@ impl SigTy { inputs: Interned::new(vec![inp]), body: Some(ret), names: NameBone::empty(), - name_started: 0, + name_started: 1, spread_left: false, spread_right: false, }) @@ -791,11 +791,12 @@ impl SigTy { } else { Ty::Tuple(elems.clone()) }; + let name_started = elems.len() as u32; Interned::new(Self { inputs: elems, body: Some(ret), names: NameBone::empty(), - name_started: 0, + name_started, spread_left: false, spread_right: false, })