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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 11348188: Ambiguous type references require a compile time error in some special cases (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/class_finalizer.h ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_finalizer.cc
===================================================================
--- runtime/vm/class_finalizer.cc (revision 15232)
+++ runtime/vm/class_finalizer.cc (working copy)
@@ -838,16 +838,6 @@
type_argument = arguments.TypeAt(i);
type_argument = FinalizeType(cls, type_argument, finalization);
if (type_argument.IsMalformed()) {
- // Malformed type arguments to a constructor of a generic type are
- // reported as a compile-time error.
- if (finalization >= kCanonicalizeForCreation) {
- const Script& script = Script::Handle(cls.script());
- const String& type_name =
- String::Handle(parameterized_type.UserVisibleName());
- ReportError(script, parameterized_type.token_pos(),
- "type '%s' has malformed type argument",
- type_name.ToCString());
- }
// In production mode, malformed type arguments are mapped to dynamic.
// In checked mode, a type with malformed type arguments is malformed.
if (FLAG_enable_type_checks || FLAG_error_on_malformed_type) {
@@ -877,7 +867,7 @@
// However, type parameter bounds are checked below, even for a raw type.
if (!arguments.IsNull() && (arguments.Length() != num_type_parameters)) {
// Wrong number of type arguments. The type is malformed.
- if (finalization >= kCanonicalizeForCreation) {
+ if (finalization >= kCanonicalizeExpression) {
const Script& script = Script::Handle(cls.script());
const String& type_name =
String::Handle(parameterized_type.UserVisibleName());
« no previous file with comments | « runtime/vm/class_finalizer.h ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698