Chromium Code Reviews| Index: pkg/compiler/lib/src/js_backend/patch_resolver.dart |
| diff --git a/pkg/compiler/lib/src/js_backend/patch_resolver.dart b/pkg/compiler/lib/src/js_backend/patch_resolver.dart |
| index 17a4a4e33edba1d436a1fad8c427aafefde7e5e8..10f30c581ac22bf5b67070ff98afe66702a36296 100644 |
| --- a/pkg/compiler/lib/src/js_backend/patch_resolver.dart |
| +++ b/pkg/compiler/lib/src/js_backend/patch_resolver.dart |
| @@ -106,10 +106,24 @@ class PatchResolverTask extends CompilerTask { |
| void checkMatchingPatchSignatures( |
| FunctionElement origin, FunctionElement patch) { |
| // TODO(johnniwinther): Show both origin and patch locations on errors. |
| + FunctionExpression originTree = origin.node; |
| FunctionSignature originSignature = origin.functionSignature; |
| FunctionExpression patchTree = patch.node; |
| FunctionSignature patchSignature = patch.functionSignature; |
| + if ('${originTree.typeVariables}' != '${patchTree.typeVariables}') { |
|
Siggi Cherem (dart-lang)
2016/11/29 18:06:56
do we use .toString anywhere else for this kind of
Johnni Winther
2016/11/30 08:14:29
We also do it in [checkMatchingPatchParameters] to
|
| + reporter.withCurrentElement(patch, () { |
| + Node errorNode = patchTree.typeVariables != null |
| + ? patchTree.typeVariables |
| + : patchTree; |
| + reporter.reportError( |
| + reporter.createMessage( |
| + errorNode, |
| + MessageKind.PATCH_TYPE_VARIABLES_MISMATCH, |
| + {'methodName': origin.name}), |
| + [reporter.createMessage(origin, MessageKind.THIS_IS_THE_METHOD)]); |
| + }); |
| + } |
| if (originSignature.type.returnType != patchSignature.type.returnType) { |
| reporter.withCurrentElement(patch, () { |
| Node errorNode = |