From 536ca9e3f4d7f182c4fe772f860421af70cd1b52 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Tue, 16 Apr 2024 10:28:37 -0700 Subject: [PATCH] Fix/simplify some validation steps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Overzealous conversion of "p of x" to "x's p" mangled some cases of "p of x, y or z"; fix them. - When validating optional arguments, shorten substeps by using "its" more consistently rather than restating the option name. - A few places were operating on options unconditionally. Make those conditional. - When comparing two args (e.g. dataTypes), make the order consistent, i.e. "if filter's dataType is not the same as input's data type". - Prefer "equal to" over "the same as" in algorithms. - Fix a list literal to use «» Also, sneak in another case where [EMULATED] text macro can be used. --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 3b07c538..a5d8aaa0 100644 --- a/index.bs +++ b/index.bs @@ -5796,7 +5796,7 @@ partial interface MLGraphBuilder { The where(|condition|, |input|, |other|) method steps are: - 1. If |condition|'s [=MLOperand/dataType=] is not equal to {{MLOperandDataType/"uint8"}}, then [=exception/throw=] a {{TypeError}}. + 1. If |condition|'s [=MLOperand/dataType=] is not {{MLOperandDataType/"uint8"}}, then [=exception/throw=] a {{TypeError}}. 1. If |input|'s [=MLOperand/dataType=] is not equal to |other|'s [=MLOperand/dataType=], then [=exception/throw=] a {{TypeError}}. 1. Let |descriptor| be a new {{MLOperandDescriptor}}. 1. Set |descriptor|.{{MLOperandDescriptor/dataType}} to |input|'s [=MLOperand/dataType=].