- The variable bindings mechanism needs to be improved. I see there is some
effort in clerezza regarding this.

It's very raw at the moment but it should be possible to have an object
appearing to be of all the visible types on the scala side.

I attached a patch to SLING-1236 [1] which implements this. I.e. values passed to the script appear to be of all visible types. I achieve this by using implicit conversion:

For a value v of type T let S be the smallest super type of T which is accessible. Then v is exposed with static type S in the script. Let further be J the set of interface implemented by T which are not implemented by S already. For each interface I in J which has no super type I' of I in J a implicit conversion from S to I is inserted into the preamble.

Michael

[1] https://issues.apache.org/jira/browse/SLING-1236

Reply via email to