Set value of field of interface type to be a class

Issue #208 invalid
Calem Bendell created an issue

I cannot set the value of an interface to be an implementing class.

The particular problem is: MinuetoWindow window = new MinuetoFrame(...)

Comments (5)

  1. Calem Bendell reporter

    This can be achieved with a self referential statement.

    Call the constructor of the desired type and set it to the value of the desired field.

    The constructor call will appear to be calling the wrong type, but the generated source is correct.

  2. Calem Bendell reporter

    (so it may be a good idea to keep this issue open to correct the error in the appearance of the lifeline)

  3. Calem Bendell reporter

    Resolving this issue to open up a related issue along a similar vein.

    Creation and setting of the value of an interface to be the value of a class implementing class can be achieved.

  4. Log in to comment