Tim Shea <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #2 from Tim Shea <> 2012-03-19 12:10:45 PDT ---
Please correct me if I'm wrong, but this does not seem incorrect to me. In
fact, if the static assert compiles and passes outside the interface, I would
think that would be an issue. After all:

interface MyInterface(T) {
  static assert(is(T : MyInterface));
MyInterface(int) a;

Should compile to :

interface MyInterface(Int) {
  static assert(is(int : MyInterface(int));

This seems self evidently false to me. An integer does not convert to a
MyInterface(int), nor should it. Regardless of where the static assert is, I
would think it should fail.

I guess if you have something like:

interface Cloneable(T) {
  T clone();

then it makes sense to say:

class CloneableObject : Cloneable(CloneableObject) {...}

but I don't think it follows that a Cloneable(CloneableObject) should be
convertible back to a plain CloneableObject.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to