fix 𝕨⊏unit
This commit is contained in:
parent
96cf03311a
commit
a94903cb12
@ -115,9 +115,9 @@ static NOINLINE NORETURN void select_properError(B w, B x) {
|
||||
B select_c2(B t, B w, B x) {
|
||||
if (isAtm(x)) thrM("⊏: 𝕩 cannot be an atom");
|
||||
ur xr = RNK(x);
|
||||
if (xr==0) thrM("⊏: 𝕩 cannot be a unit");
|
||||
if (isAtm(w)) {
|
||||
watom:;
|
||||
if (xr==0) thrM("⊏: 𝕩 cannot be a unit");
|
||||
usz xn = *SH(x);
|
||||
usz wi = WRAP(o2i64(w), xn, thrF("⊏: Indexing out-of-bounds (%R∊𝕨, %s≡≠𝕩)", w, xn));
|
||||
if (xr==1) {
|
||||
|
||||
@ -116,6 +116,12 @@
|
||||
%USE tvar ⋄ !∘≡¨⟜⊏ ∾ {⥊𝕨 ⊏⎊(•CurrentError∘⊢) _tvar 𝕩}´¨ ⟨⟨0‿1, ⋈0⟩ ⋄ ⟨0‿1, "?"⟩ ⋄ ⟨0‿1, ≍0‿1⟩⟩
|
||||
a←↕2 ⋄ ! "e" ≡ (↕10){b←a‿a‿a‿a‿a‿a‿a‿a‿a‿a ⋄ 𝕨⊏⎊"e"𝕩}⟨1‿2,3‿4⟩ ⋄ ! 0‿1 ≡ a
|
||||
%USE eqvar ⋄ {1‿¯1 {r←𝕨⊏𝕩 ⋄ ! 𝕩 ≥○•internal.ElType r ⋄ r}_eqvar 𝕩}¨ ⟨↕2, ↕4, "hello", ⟨"ab", "cd", "ef"⟩, ↕⋈4⟩
|
||||
!"⊏: 𝕩 cannot be a unit" % 0⊏<"a"
|
||||
!"⊏: 𝕩 cannot be a unit" % 0⊏<5
|
||||
!"⊏: 𝕩 cannot be an atom" % 0⊏5
|
||||
!"⊏: 𝕩 cannot be a unit" % ⟨⟩⊏<"a"
|
||||
!"⊏: 𝕩 cannot be a unit" % ⟨⟩⊏<5
|
||||
!"⊏: 𝕩 cannot be an atom" % ⟨⟩⊏5
|
||||
|
||||
# 𝕨⊑𝕩
|
||||
!"⊑: 𝕨 contained a non-integer" % ⟨0.1⟩⊑↕3
|
||||
@ -361,4 +367,4 @@ w←1‿1⥊1 ⋄ x←2⥊1 ⋄ w‿x <¨↩ ⋄ {! (∾⟨•Repr𝕩,": Expe
|
||||
# ˜
|
||||
5˜˝ "ab" %% 5
|
||||
5˜⌜˜ "a" %% [[5]]
|
||||
5˜˝˘≍"ab" %% ⟨5⟩
|
||||
5˜˝˘≍"ab" %% ⟨5⟩
|
||||
|
||||
Loading…
Reference in New Issue
Block a user