| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 package com.google.dart.compiler.resolver; | 4 package com.google.dart.compiler.resolver; |
| 5 | 5 |
| 6 import com.google.dart.compiler.ErrorCode; | 6 import com.google.dart.compiler.ErrorCode; |
| 7 import com.google.dart.compiler.ErrorSeverity; | 7 import com.google.dart.compiler.ErrorSeverity; |
| 8 import com.google.dart.compiler.SubSystem; | 8 import com.google.dart.compiler.SubSystem; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 THIS_ON_TOP_LEVEL("Cannot use 'this' in a top-level element"), | 145 THIS_ON_TOP_LEVEL("Cannot use 'this' in a top-level element"), |
| 146 THIS_OUTSIDE_OF_METHOD("Cannot use 'this' outside of a method"), | 146 THIS_OUTSIDE_OF_METHOD("Cannot use 'this' outside of a method"), |
| 147 THIS_IN_FACTORY_CONSTRUCTOR("Cannot use 'this' in a factory constructor"), | 147 THIS_IN_FACTORY_CONSTRUCTOR("Cannot use 'this' in a factory constructor"), |
| 148 TOO_MANY_QUALIFIERS_FOR_METHOD("Too many qualifiers for method or constructor"
), | 148 TOO_MANY_QUALIFIERS_FOR_METHOD("Too many qualifiers for method or constructor"
), |
| 149 TYPE_ARGS_ONLY_ON_CONSTRUCTORS("Type arguments are only allowed on constructor
methods"), | 149 TYPE_ARGS_ONLY_ON_CONSTRUCTORS("Type arguments are only allowed on constructor
methods"), |
| 150 TYPE_NOT_ASSIGNMENT_COMPATIBLE("%s is not assignable to %s"), | 150 TYPE_NOT_ASSIGNMENT_COMPATIBLE("%s is not assignable to %s"), |
| 151 TYPE_VARIABLE_DOES_NOT_MATCH("Type variable %s does not match %s in default cl
ass %s."), | 151 TYPE_VARIABLE_DOES_NOT_MATCH("Type variable %s does not match %s in default cl
ass %s."), |
| 152 TYPE_PARAMETERS_MUST_MATCH_EXACTLY( | 152 TYPE_PARAMETERS_MUST_MATCH_EXACTLY( |
| 153 "Type parameters in default declaration must match referenced class exactly
"), | 153 "Type parameters in default declaration must match referenced class exactly
"), |
| 154 TYPE_VARIABLE_IN_STATIC_CONTEXT("cannot access type variable %s in static cont
ext"), | 154 TYPE_VARIABLE_IN_STATIC_CONTEXT("cannot access type variable %s in static cont
ext"), |
| 155 TYPE_VARIABLE_NOT_ALLOWED_IN_IDENTIFIER("type variables are not allowed in ide
ntifier expressions"), |
| 155 WRONG_NUMBER_OF_TYPE_ARGUMENTS("%s: wrong number of type arguments (%d). Expe
cted %d"); | 156 WRONG_NUMBER_OF_TYPE_ARGUMENTS("%s: wrong number of type arguments (%d). Expe
cted %d"); |
| 156 private final ErrorSeverity severity; | 157 private final ErrorSeverity severity; |
| 157 private final String message; | 158 private final String message; |
| 158 | 159 |
| 159 /** | 160 /** |
| 160 * Initialize a newly created error code to have the given message and ERROR s
everity. | 161 * Initialize a newly created error code to have the given message and ERROR s
everity. |
| 161 */ | 162 */ |
| 162 private ResolverErrorCode(String message) { | 163 private ResolverErrorCode(String message) { |
| 163 this(ErrorSeverity.ERROR, message); | 164 this(ErrorSeverity.ERROR, message); |
| 164 } | 165 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 179 @Override | 180 @Override |
| 180 public ErrorSeverity getErrorSeverity() { | 181 public ErrorSeverity getErrorSeverity() { |
| 181 return severity; | 182 return severity; |
| 182 } | 183 } |
| 183 | 184 |
| 184 @Override | 185 @Override |
| 185 public SubSystem getSubSystem() { | 186 public SubSystem getSubSystem() { |
| 186 return SubSystem.RESOLVER; | 187 return SubSystem.RESOLVER; |
| 187 } | 188 } |
| 188 } | 189 } |
| OLD | NEW |