diff options
| author | Laurenz <laurmaedje@gmail.com> | 2025-01-31 10:56:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-31 09:56:49 +0000 |
| commit | a1f263862ca3c9594700f0c95a8e5798baf07ea9 (patch) | |
| tree | b635c0fb9ad3b1747a91811807037d3a7e100398 | |
| parent | 3eb6e87af1d8870a38cc5914e345d07373e1e8c1 (diff) | |
Change type repr to short name (#5788)
| -rw-r--r-- | crates/typst-library/src/foundations/ty.rs | 2 | ||||
| -rw-r--r-- | tests/suite/foundations/repr.typ | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/typst-library/src/foundations/ty.rs b/crates/typst-library/src/foundations/ty.rs index a2395f2a..973c1cb6 100644 --- a/crates/typst-library/src/foundations/ty.rs +++ b/crates/typst-library/src/foundations/ty.rs @@ -136,7 +136,7 @@ impl Repr for Type { } else if *self == Type::of::<NoneValue>() { "type(none)" } else { - self.long_name() + self.short_name() } .into() } diff --git a/tests/suite/foundations/repr.typ b/tests/suite/foundations/repr.typ index 36823e98..2f2c055a 100644 --- a/tests/suite/foundations/repr.typ +++ b/tests/suite/foundations/repr.typ @@ -37,8 +37,8 @@ #t(() => none, `(..) => ..`) // Types. -#t(int, `integer`) -#t(type("hi"), `string`) +#t(int, `int`) +#t(type("hi"), `str`) #t(type((a: 1)), `dictionary`) // Constants. |
