OOP - Unbound value when attempting to call a class in Reason

113 Views Asked by At

I have the following class, which has a method, methodA, I am trying to call (using Reason):

class abstractProductA = {
  as self;
  pub methodA => "name";
};

abstractProductA#methodA;

The compiler outputs the following error:

Unbound value abstractProductA

Any suggestions would be more than welcome. Thank you.

1

There are 1 best solutions below

0
On BEST ANSWER

You need to make an instance of the class:

(new abstractProductA)#methodA;