Chromium Code Reviews| Index: runtime/vm/parser.cc |
| =================================================================== |
| --- runtime/vm/parser.cc (revision 11203) |
| +++ runtime/vm/parser.cc (working copy) |
| @@ -2069,6 +2069,20 @@ |
| Function::Handle(innermost_function().raw()); |
| innermost_function_ = func.raw(); |
| + // Check to ensure we don't have classes with native fields in libraries |
| + // which do not have a native resolver. |
|
siva
2012/08/23 01:47:56
We should probably add a comment that we delay thi
regis
2012/08/23 03:26:05
Done.
|
| + if (current_class().num_native_fields() != 0) { |
| + const Library& lib = Library::Handle(current_class().library()); |
| + if (lib.native_entry_resolver() == NULL) { |
| + const String& cls_name = String::Handle(current_class().Name()); |
| + const String& lib_name = String::Handle(lib.url()); |
| + ErrorMsg(current_class().token_pos(), |
| + "class '%s' is trying to extend a native fields class, " |
| + "but library '%s' has no native resolvers", |
| + cls_name.ToCString(), lib_name.ToCString()); |
| + } |
| + } |
| + |
| if (func.IsConstructor()) { |
| SequenceNode* statements = ParseConstructor(func, default_parameter_values); |
| innermost_function_ = saved_innermost_function.raw(); |