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

Side by Side Diff: pkg/compiler/lib/src/warnings.dart

Issue 1151063003: Allow this?.foo (again) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | no next file » | 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 part of dart2js; 5 part of dart2js;
6 6
7 const DONT_KNOW_HOW_TO_FIX = "Computer says no!"; 7 const DONT_KNOW_HOW_TO_FIX = "Computer says no!";
8 8
9 /** 9 /**
10 * The messages in this file should meet the following guide lines: 10 * The messages in this file should meet the following guide lines:
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 examples: const [""" 591 examples: const ["""
592 class C<T extends num> {} 592 class C<T extends num> {}
593 593
594 // 'String' is not a valid instantiation of T with bound num.'. 594 // 'String' is not a valid instantiation of T with bound num.'.
595 main() => new C<String>(); 595 main() => new C<String>();
596 """]); 596 """]);
597 597
598 static const MessageKind INVALID_USE_OF_SUPER = const MessageKind( 598 static const MessageKind INVALID_USE_OF_SUPER = const MessageKind(
599 "'super' not allowed here."); 599 "'super' not allowed here.");
600 600
601 static const MessageKind INVALID_USE_OF_THIS = const MessageKind(
602 "'this' not allowed here.");
603
604 static const MessageKind INVALID_CASE_DEFAULT = const MessageKind( 601 static const MessageKind INVALID_CASE_DEFAULT = const MessageKind(
605 "'default' only allowed on last case of a switch."); 602 "'default' only allowed on last case of a switch.");
606 603
607 static const MessageKind SWITCH_CASE_TYPES_NOT_EQUAL = const MessageKind( 604 static const MessageKind SWITCH_CASE_TYPES_NOT_EQUAL = const MessageKind(
608 "'case' expressions do not all have type '#{type}'."); 605 "'case' expressions do not all have type '#{type}'.");
609 606
610 static const MessageKind SWITCH_CASE_TYPES_NOT_EQUAL_CASE = const MessageKind( 607 static const MessageKind SWITCH_CASE_TYPES_NOT_EQUAL_CASE = const MessageKind(
611 "'case' expression of type '#{type}'."); 608 "'case' expression of type '#{type}'.");
612 609
613 static const MessageKind SWITCH_CASE_FORBIDDEN = const MessageKind( 610 static const MessageKind SWITCH_CASE_FORBIDDEN = const MessageKind(
(...skipping 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after
2575 static String convertToString(value) { 2572 static String convertToString(value) {
2576 if (value is ErrorToken) { 2573 if (value is ErrorToken) {
2577 // Shouldn't happen. 2574 // Shouldn't happen.
2578 return value.assertionMessage; 2575 return value.assertionMessage;
2579 } else if (value is Token) { 2576 } else if (value is Token) {
2580 value = value.value; 2577 value = value.value;
2581 } 2578 }
2582 return '$value'; 2579 return '$value';
2583 } 2580 }
2584 } 2581 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698