Revert "disable an annoying old type check syntax"
All checks were successful
CI / test-core (14, ubuntu-latest, 3.x, interp) (push) Successful in 2m5s
CI / test-core (14, ubuntu-latest, 3.x, nodejs) (push) Successful in 1m48s
CI / test-core (14, ubuntu-latest, 3.x, py) (push) Successful in 2m2s
CI / test-core (14, ubuntu-latest, 3.x, js) (push) Successful in 3m11s
CI / test-core (14, ubuntu-latest, 3.x, cpp) (push) Successful in 3m48s

This reverts commit 0e02c6c910.
This commit is contained in:
2025-09-09 13:59:12 -05:00
parent c88d7a44f8
commit 84b09821f2

View File

@@ -472,12 +472,11 @@ class SpecialForms {
};
// Type check syntax:
k.doc("the", 2, 3, '(the <type> <value>)');
k.doc("the", 2, 3, '(the <?package> <type> <value>)');
map["the"] = (wholeExp:ReaderExp, args:Array<ReaderExp>, k:KissState) -> {
var pkg = "";
var whichArg = "first";
if (args.length == 3) {
throw KissError.fromExp(wholeExp, "(the <package> <Type> <value>) form is no longer allowed. use (the <package.Type> <value>) instead");
pkg = switch (args.shift().def) {
case Symbol(pkg): pkg;
default: throw KissError.fromExp(wholeExp, '$whichArg argument to (the... ) should be a valid haxe package');