| Index: runtime/vm/parser.cc
|
| ===================================================================
|
| --- runtime/vm/parser.cc (revision 24703)
|
| +++ runtime/vm/parser.cc (working copy)
|
| @@ -1805,6 +1805,10 @@
|
| "unresolved implicit call to super constructor '%s()'",
|
| String::Handle(super_class.Name()).ToCString());
|
| }
|
| + if (current_function().is_const() && !super_ctor.is_const()) {
|
| + ErrorMsg(supercall_pos, "implicit call to non-const super constructor");
|
| + }
|
| +
|
| String& error_message = String::Handle();
|
| if (!super_ctor.AreValidArguments(arguments->length(),
|
| arguments->names(),
|
| @@ -1863,6 +1867,9 @@
|
| "super class constructor '%s' not found",
|
| ctor_name.ToCString());
|
| }
|
| + if (current_function().is_const() && !super_ctor.is_const()) {
|
| + ErrorMsg(supercall_pos, "super constructor must be const");
|
| + }
|
| String& error_message = String::Handle();
|
| if (!super_ctor.AreValidArguments(arguments->length(),
|
| arguments->names(),
|
|
|