Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: runtime/vm/class_finalizer.cc

Issue 9169032: Allow the list of type parameters in the default factory clause to be omitted. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/class_finalizer.h" 5 #include "vm/class_finalizer.h"
6 6
7 #include "vm/flags.h" 7 #include "vm/flags.h"
8 #include "vm/heap.h" 8 #include "vm/heap.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 for (intptr_t i = 0; !mismatch && (i < num_type_params); i++) { 398 for (intptr_t i = 0; !mismatch && (i < num_type_params); i++) {
399 expected_type_name ^= expected_type_names.At(i); 399 expected_type_name ^= expected_type_names.At(i);
400 actual_type_name ^= actual_type_names.At(i); 400 actual_type_name ^= actual_type_names.At(i);
401 expected_type_extends = expected_extends_array.TypeAt(i); 401 expected_type_extends = expected_extends_array.TypeAt(i);
402 actual_type_extends = actual_extends_array.TypeAt(i); 402 actual_type_extends = actual_extends_array.TypeAt(i);
403 if (!expected_type_name.Equals(actual_type_name) || 403 if (!expected_type_name.Equals(actual_type_name) ||
404 !expected_type_extends.Equals(actual_type_extends)) { 404 !expected_type_extends.Equals(actual_type_extends)) {
405 mismatch = true; 405 mismatch = true;
406 } 406 }
407 } 407 }
408 if (mismatch) { 408 // The list of type parameters in the default factory clause can be omitted.
409 if (mismatch && (num_type_params > 0)) {
409 const String& interface_name = String::Handle(interface.Name()); 410 const String& interface_name = String::Handle(interface.Name());
410 const String& factory_name = String::Handle(factory_class.Name()); 411 const String& factory_name = String::Handle(factory_class.Name());
411 const Script& script = Script::Handle(interface.script()); 412 const Script& script = Script::Handle(interface.script());
412 ReportError(script, unresolved_factory_class.token_index(), 413 ReportError(script, unresolved_factory_class.token_index(),
413 "mismatch in number, names, or bounds of type parameters " 414 "mismatch in number, names, or bounds of type parameters "
414 "between default clause of interface '%s' and actual factory " 415 "between default clause of interface '%s' and actual factory "
415 "class '%s'.\n", 416 "class '%s'.\n",
416 interface_name.ToCString(), 417 interface_name.ToCString(),
417 factory_name.ToCString()); 418 factory_name.ToCString());
418 } 419 }
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 va_end(args); 1244 va_end(args);
1244 if (FLAG_warning_as_error) { 1245 if (FLAG_warning_as_error) {
1245 Isolate::Current()->long_jump_base()->Jump(1, error); 1246 Isolate::Current()->long_jump_base()->Jump(1, error);
1246 UNREACHABLE(); 1247 UNREACHABLE();
1247 } else { 1248 } else {
1248 OS::Print("%s", error.ToErrorCString()); 1249 OS::Print("%s", error.ToErrorCString());
1249 } 1250 }
1250 } 1251 }
1251 1252
1252 } // namespace dart 1253 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698