Unification stage appears to fail when performing access:
class A
def (a, b): (Int, Int) := (10, 100)
def a := A()
print a.a
print a.b
Gives the following error:
[error | type] Cannot infer type. Expected a String, was `a.a`.__str__(`a.a`)
6 | print a.a
^^^
This happens also with primitives:
I.e.:
[error | type] Cannot infer type. Expected a String, was `self.required_field@0`.__str__(`self.required_field@0`)
22 | def fun_a(self: SomeState) => self.some_field := "my field is {self.required_field}"
^^^^^^^^^^^^^^^^^^^
23 | def fun_b(self) => print "this function is private: {self.private_field}!"
Description of Bug
Unification stage appears to fail when performing access:
Gives the following error:
This happens also with primitives: I.e.:
More in-depth description might follow.