eo
eo copied to clipboard
Missing attribute `Δ`
Object Float
has the following definition:
+package org.eolang
+rt jvm org.eolang:eo-runtime:0.0.0
[value] > Float
# Sum of $ and x
[x] > add
Float (^.value.add (x.float.value)) > @
# Tests that $ = x
[x] > eq
^.value.eq (x.float.value) > @
# Converts this to float
[] > float
^ > @
Test with the following line reports error about missing attribute Δ
on an object Float:
((Float 4.0).add (Float 5.7)).eq (Float 9.7)
But if we substitute the definition of add
attribute explicitly, then somehow the test starts to pass:
(Float ((Float 4.0).value.add ((Float 5.7).float.value))).eq (Float 9.7)
@bugdea1er interesting... definitely a bug
@bugdea1er can you make this sample somehow smaller? Now it's pretty hard to understand where is the bug.
@Graur can you please check this