ceylon / ceylon-spec

DEPRECATED
Apache License 2.0
108 stars 34 forks source link

allow shortcut refinement in constructors #1340

Open gavinking opened 9 years ago

gavinking commented 9 years ago

It's quite irritating that the following doesn't work:

class Bool of true|false {
    shared new true {
        string => "true";
    }
    shared new false {
        string => "false";
    }
}

Instead we have to explicitly declare that we're refining Object.string.

We don't have time to fix this in 1.2.