eo icon indicating copy to clipboard operation
eo copied to clipboard

an attribute is absent, though it is not

Open dours opened this issue 3 years ago • 5 comments

This one fails

+package org.eolang
+junit

[] > assign-3
  [value] > pybool
    value > @
  [value] > pyint
    [x] > eq
      pybool (value.eq (x.value)) > @
    [x] > add
      pyint (value.add (x.value)) > @
  (((pyint 1).add (pyint 3))).eq (pyint 4) > @

This worakround does not help (i.e., the following test fails with the same reason):

[] > assign-3
  [value] > pybool
    value > @
  [value] > pyint
    [x] > eq
      ^.^.pybool (value.eq (x.value)) > @
    [x] > add
      pyint (value.add (x.value)) > @
  (((pyint 1).add (pyint 3))).eq (pyint 4) > @

This attempt to minimize does not fail

[] > assign-3
  [value] > pybool
    value > @
  [value] > pyint
    [x] > eq
      pybool (value.eq (x.value)) > @
    [x] > add
      pyint (value.add (x.value)) > @
  (pyint 4).eq (pyint 4) > @

dours avatar Jun 07 '22 20:06 dours

@Graur pls, dispatch this one

yegor256 avatar Sep 08 '22 15:09 yegor256

@includealex Can you check if this example still doesn't work?

Graur avatar Sep 08 '22 16:09 Graur

@Graur this example still doesn't work

includealex avatar Sep 15 '22 13:09 includealex

@includealex what is the output message?

Graur avatar Sep 15 '22 14:09 Graur

@Graur first example gives this error

  EOassign_3Test.testWorks:88->PhDefault.attr:243->PhDefault.attr:243 » Ex EOorg.EOeolang.EOstringν52946="The object is at
the line #208, position #6; caused by ExUnset: Error at "EOorg.EOeolang.EOassign_3Test.EOω1pyint#pybool" attribute; caused
by ExUnset: Can't get(), attribute "pybool" is absent among other 5 attrs (add, ρ, σ, eq, value) and φ is absent"SF

and second gives this one

  EOassign_3Test.testWorks:88->PhDefault.attr:243 » Ex EOorg.EOeolang.EOstringν47531="The object is at the line #206, 
position #7; caused by ExUnset: Error at "eq.ρ" attribute; caused by ExUnset: Error at "add.ρ" attribute; caused by ExUnset: Error
at "EOorg.EOeolang.EOassign_3Test.EOω1pyint#pybool" attribute; caused by ExUnset: Can't get(), attribute "pybool" is absent
among other 5 attrs (add, ρ, σ, eq, value) and φ is absent"

each test was started from the 201 line.

includealex avatar Sep 15 '22 14:09 includealex

@includealex Do you have any ideas why is it happened?

Graur avatar Nov 14 '22 08:11 Graur

@Graur let's resolve this

yegor256 avatar Mar 05 '23 05:03 yegor256

@dours Please, check the fix below:

[] > assign-3
  [value] > pybool
    value > @
  [value] > pyint
    [x] > eq
      pybool (value.eq (x.value)) > @
    [x] > add
      ^.^.pyint (value.plus (x.value)) > @
  ((pyint 1).add (pyint 3)).eq (pyint 4) > @ 

We need to strictly identify pyint object. Proof: #2042

Graur avatar May 04 '23 09:05 Graur