Don <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #1 from Don <> 2011-01-13 07:00:28 PST ---
As soon as you add a constructor to Foo, you disable the implicit constructor.
So it's correct for the compiler to complain.
Probably the wording of the error message could be improved, but I don't think
this is a rejects-valid bug.

(In reply to comment #0)
> I mean it also does it the other way around:

No, it doesn't. See below:

> "If there is no constructor for a class, but there is a constructor for the
> base class, a default constructor of the form: this() { } is implicitly
> generated."
> (Though the spec could be clearer here, does this also mean that a super() 
> call
> is inserted into this newly generated this()?)

Yes. And look what it does:

class Foo
    this(float f) {}

class Bar : Foo

-> foo.d(7): Error: constructor foo.Bar.this no match for implicit super() call
in constructor

Actually it shouldn't insert an implicit this() unless the base class has a
this(). Instead, it should complain that Bar needs a constructor, because Foo
has one.

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

Reply via email to