Closed jvasileff closed 9 years ago
Per spec, something() => "";
is a LazySpecification
, which is a Statement
, not a Declaration
, and therefore not allowed in an InterfaceBody
. As far as I can tell, it is a typechecker bug that I2
is not rejected. @gavinking?
(You can also see this in regular classes: this comment in LinkedList.ceylon
is incorrect, since some shortcut refinements extend the initializer section all the way to the bottom of the file, as can be seen in the IDE.)
No, it's a shortcut refinement, and totally allowed.
Ah, but indeed the grammar in the spec does not make clear that shortcut refinements are allowed in interface bodies. I need to fix that.
This typechecks:
but is not supported by
InterfaceBody
, and consequently blows upinterfaceBodyToCeylon
: