ceylon / ceylon-spec

DEPRECATED
Apache License 2.0
108 stars 34 forks source link

Spec grammar for ClassSpecifier (class aliases) is unclear #1388

Closed lucaswerkmeister closed 9 years ago

lucaswerkmeister commented 9 years ago
ClassSpecifier: "=>" (Extension | SuperclassExtension) PositionalArguments
  1. Extension already includes optional PositionalArguments. Does this mean that => C()() is a legal ClassSpecifier? (The prose – especially the “treated as a value expression” thing – probably forbids this.)
  2. The rest of the specification never mentions any SuperclassExtension. Do you mean SuperExtension? But that’s already included in

    Extension: (BaseExtension | SuperExtension) PositionalArguments?

To resolve both these questions, I suspect the intended and correct grammar is

ClassSpecifier: "=>" (BaseExtension | SuperExtension) PositionalArguments

that is, the same as "=>" Extension, except that the PositionalArguments aren’t optional.

gavinking commented 9 years ago

Thanks. What happened here is that I changed the grammar for extends when adding constructors, but didn't propagate the change to class aliases.

lucaswerkmeister commented 9 years ago

Alright, thanks for the fix.