support shortcut refinement of values as if they were functions
The following valid code:
interface I {
shared formal String() v;
}
class C() satisfies I {
v() => "";
}
results in:
source/simple/run.ceylon:5: error: Ceylon backend error: incompatible types: String cannot be converted to Callable<? extends String>
v() => "";
^
1 error
I'm very surprised that this isn't working already.
Well, I didn't even know the spec allowed this. Is I.v defined as a Value or a Function here?
Well, I didn't even know the spec allowed this
I had no idea either; never thought to try it.
Is I.v defined as a Value or a Function here
v is Value, everywhere (I know this because I wound up creating a fake Function to help with parts of the Dart backend impl.)
This requires changes in ClassTransformer.transformRefinementSpecifierStatement that are hard to write and test. IMO this is too much work to fix for 1.2.3 for too little value because it's never been used before. Moving to 1.3.
Not for 1.3.1.
Strange feature, do we even need it? :)