diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-09-11 17:26:56 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-09-11 17:38:03 +0200 |
| commit | 2dc000daeba1718673b0f0025b31a78c001223d1 (patch) | |
| tree | 2ec20647f8511074b2fcc660263d705e917e3e91 /tests/typ | |
| parent | 3a979e88da7be6240821ba8acfdd376b7f4e0f09 (diff) | |
Type compatibility
For now, types can be used like strings in operations to prevent breakage of many packages. Hopefully, we can get rid of this in the future.
Diffstat (limited to 'tests/typ')
| -rw-r--r-- | tests/typ/compiler/type-compatibility.typ | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/typ/compiler/type-compatibility.typ b/tests/typ/compiler/type-compatibility.typ new file mode 100644 index 00000000..664981f4 --- /dev/null +++ b/tests/typ/compiler/type-compatibility.typ @@ -0,0 +1,10 @@ +// Test compatibility between types and strings. +// Ref: false + +--- +#test(type(10), int) +#test(type(10), "integer") +#test("is " + type(10), "is integer") +#test(int in ("integer", "string"), true) +#test(int in "integers or strings", true) +#test(str in "integers or strings", true) |
