 Chromium Code Reviews
 Chromium Code Reviews Issue 2977903002:
  Remove deprecated_warningNotError.  (Closed)
    
  
    Issue 2977903002:
  Remove deprecated_warningNotError.  (Closed) 
  | Index: pkg/front_end/lib/src/fasta/kernel/body_builder.dart | 
| diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart | 
| index f69a0bf9ef20d82e300ad5307ca913e9cdaeef31..5f36b19f5645c4e7309b9f17fc181b82201fe645 100644 | 
| --- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart | 
| +++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart | 
| @@ -3012,7 +3012,9 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper { | 
| DartType bound = pop(); | 
| if (bound != null) { | 
| // TODO(ahe): To handle F-bounded types, this needs to be a TypeBuilder. | 
| - deprecated_warningNotError("Type variable bounds not implemented yet.", | 
| + warningNotError( | 
| + fasta.templateUnspecified | 
| + .withArguments("Type variable bounds not implemented yet."), | 
| 
Johnni Winther
2017/07/13 09:11:51
Any reason for not making this a template?
 
ahe
2017/07/13 11:14:19
I've used the same template as `unimplemented`.
 | 
| offsetForToken(extendsOrSuper.next)); | 
| } | 
| Identifier name = pop(); | 
| @@ -3120,8 +3122,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper { | 
| } | 
| Expression buildFallThroughError(int charOffset) { | 
| - deprecated_warningNotError( | 
| - "Switch case may fall through to next case.", charOffset); | 
| + warningNotError(fasta.messageSwitchCaseFallThrough, charOffset); | 
| Location location = messages.getLocationFromUri(uri, charOffset); | 
| @@ -3182,12 +3183,14 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper { | 
| if (builder.isFinal && builder.hasInitializer) { | 
| // TODO(ahe): If CL 2843733002 is landed, this becomes a compile-time | 
| // error. Also, this is a compile-time error in strong mode. | 
| - deprecated_warningNotError( | 
| - "'$name' is final instance variable that has already been " | 
| - "initialized.", | 
| + warningNotError( | 
| + fasta.templateFinalInstanceVariableAlreadyInitialized | 
| + .withArguments(name), | 
| offset); | 
| - deprecated_warningNotError( | 
| - "'$name' was initialized here.", builder.charOffset); | 
| + warningNotError( | 
| + fasta.templateFinalInstanceVariableAlreadyInitializedCause | 
| + .withArguments(name), | 
| + builder.charOffset); | 
| Builder constructor = | 
| library.loader.getDuplicatedFieldInitializerError(); | 
| return buildInvalidInitializer( | 
| @@ -3280,10 +3283,6 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper { | 
| } | 
| } | 
| - void deprecated_warningNotError(String message, [int charOffset = -1]) { | 
| - super.deprecated_warning(message, charOffset); | 
| - } | 
| - | 
| void warningNotError(Message message, int charOffset) { | 
| super.warning(message, charOffset); | 
| } |