OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013, the Dart project authors. | 2 * Copyright (c) 2013, the Dart project authors. |
3 * | 3 * |
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except | 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except |
5 * in compliance with the License. You may obtain a copy of the License at | 5 * in compliance with the License. You may obtain a copy of the License at |
6 * | 6 * |
7 * http://www.eclipse.org/legal/epl-v10.html | 7 * http://www.eclipse.org/legal/epl-v10.html |
8 * | 8 * |
9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License | 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License |
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express | 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express |
(...skipping 5363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5374 } | 5374 } |
5375 | 5375 |
5376 /** | 5376 /** |
5377 * This verifies that if the given class declaration implements the class Func
tion that it has a | 5377 * This verifies that if the given class declaration implements the class Func
tion that it has a |
5378 * concrete implementation of the call method. | 5378 * concrete implementation of the call method. |
5379 * | 5379 * |
5380 * @return {@code true} if and only if an error code is generated on the passe
d node | 5380 * @return {@code true} if and only if an error code is generated on the passe
d node |
5381 * @see StaticWarningCode#FUNCTION_WITHOUT_CALL | 5381 * @see StaticWarningCode#FUNCTION_WITHOUT_CALL |
5382 */ | 5382 */ |
5383 private boolean checkImplementsFunctionWithoutCall(ClassDeclaration node) { | 5383 private boolean checkImplementsFunctionWithoutCall(ClassDeclaration node) { |
5384 if (node.getAbstractKeyword() != null) { | 5384 if (node.isAbstract()) { |
5385 return false; | 5385 return false; |
5386 } | 5386 } |
5387 ClassElement classElement = node.getElement(); | 5387 ClassElement classElement = node.getElement(); |
5388 if (classElement == null) { | 5388 if (classElement == null) { |
5389 return false; | 5389 return false; |
5390 } | 5390 } |
5391 if (!classElement.getType().isSubtypeOf(typeProvider.getFunctionType())) { | 5391 if (!classElement.getType().isSubtypeOf(typeProvider.getFunctionType())) { |
5392 return false; | 5392 return false; |
5393 } | 5393 } |
5394 // If there is a noSuchMethod method, then don't report the warning, see dar
tbug.com/16078 | 5394 // If there is a noSuchMethod method, then don't report the warning, see dar
tbug.com/16078 |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5924 InterfaceType[] interfaceTypes = classElt.getInterfaces(); | 5924 InterfaceType[] interfaceTypes = classElt.getInterfaces(); |
5925 for (InterfaceType interfaceType : interfaceTypes) { | 5925 for (InterfaceType interfaceType : interfaceTypes) { |
5926 if (safeCheckForRecursiveInterfaceInheritance(interfaceType.getElement(),
path)) { | 5926 if (safeCheckForRecursiveInterfaceInheritance(interfaceType.getElement(),
path)) { |
5927 return true; | 5927 return true; |
5928 } | 5928 } |
5929 } | 5929 } |
5930 path.remove(path.size() - 1); | 5930 path.remove(path.size() - 1); |
5931 return false; | 5931 return false; |
5932 } | 5932 } |
5933 } | 5933 } |
OLD | NEW |