| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library test.src.serialization.elements_test; | 5 library test.src.serialization.elements_test; |
| 6 | 6 |
| 7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/constant/value.dart'; | 8 import 'package:analyzer/dart/constant/value.dart'; |
| 9 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
| 10 import 'package:analyzer/dart/element/type.dart'; | 10 import 'package:analyzer/dart/element/type.dart'; |
| (...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1252 } | 1252 } |
| 1253 return false; | 1253 return false; |
| 1254 } else if (modifier == Modifier.SETTER) { | 1254 } else if (modifier == Modifier.SETTER) { |
| 1255 if (element is PropertyAccessorElement) { | 1255 if (element is PropertyAccessorElement) { |
| 1256 return element.isSetter; | 1256 return element.isSetter; |
| 1257 } | 1257 } |
| 1258 return false; | 1258 return false; |
| 1259 } else if (modifier == Modifier.STATIC) { | 1259 } else if (modifier == Modifier.STATIC) { |
| 1260 if (element is ExecutableElement) { | 1260 if (element is ExecutableElement) { |
| 1261 return element.isStatic; | 1261 return element.isStatic; |
| 1262 } else if (element is FieldElement) { |
| 1263 return element.isStatic; |
| 1262 } | 1264 } |
| 1263 return false; | 1265 return false; |
| 1264 } else if (modifier == Modifier.SYNTHETIC) { | 1266 } else if (modifier == Modifier.SYNTHETIC) { |
| 1265 return element.isSynthetic; | 1267 return element.isSynthetic; |
| 1266 } | 1268 } |
| 1267 throw new UnimplementedError( | 1269 throw new UnimplementedError( |
| 1268 'Modifier $modifier for ${element?.runtimeType}'); | 1270 'Modifier $modifier for ${element?.runtimeType}'); |
| 1269 } | 1271 } |
| 1270 } | 1272 } |
| 1271 | 1273 |
| (...skipping 3431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4703 fail('Unexpectedly tried to get unlinked summary for $uri'); | 4705 fail('Unexpectedly tried to get unlinked summary for $uri'); |
| 4704 } | 4706 } |
| 4705 return serializedUnit; | 4707 return serializedUnit; |
| 4706 } | 4708 } |
| 4707 | 4709 |
| 4708 @override | 4710 @override |
| 4709 bool hasLibrarySummary(String uri) { | 4711 bool hasLibrarySummary(String uri) { |
| 4710 return true; | 4712 return true; |
| 4711 } | 4713 } |
| 4712 } | 4714 } |
| OLD | NEW |