From 23875a04832a79b6c4fa47d243d9af9650839ff6 Mon Sep 17 00:00:00 2001 From: Leedehai <18319900+Leedehai@users.noreply.github.com> Date: Tue, 9 Jan 2024 02:45:24 -0500 Subject: Let type constructor/field access error report the name correctly (#3140) Co-authored-by: Laurenz --- tests/typ/bugs/3110-no-type-ctor-or-field.typ | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/typ/bugs/3110-no-type-ctor-or-field.typ (limited to 'tests') diff --git a/tests/typ/bugs/3110-no-type-ctor-or-field.typ b/tests/typ/bugs/3110-no-type-ctor-or-field.typ new file mode 100644 index 00000000..61d65253 --- /dev/null +++ b/tests/typ/bugs/3110-no-type-ctor-or-field.typ @@ -0,0 +1,15 @@ +// Issue #3110: let the error message report the type name. +// https://github.com/typst/typst/issues/3110 +// Ref: false + +--- +// Error: 2-9 type content does not have a constructor +#content() + +--- +// Error: 6-12 type integer does not contain field `MAXVAL` +#int.MAXVAL + +--- +// Error: 6-18 type string does not contain field `from-unĂ¯code` +#str.from-unĂ¯code(97) -- cgit v1.2.3