Index: pkg/analyzer/lib/src/kernel/resynthesize.dart |
diff --git a/pkg/analyzer/lib/src/kernel/resynthesize.dart b/pkg/analyzer/lib/src/kernel/resynthesize.dart |
index 0931edff0db979af808457f9e5b5aa9d26bb53e7..d3c23f7e9c5b4f8cbccdcf94d746c04de16760d3 100644 |
--- a/pkg/analyzer/lib/src/kernel/resynthesize.dart |
+++ b/pkg/analyzer/lib/src/kernel/resynthesize.dart |
@@ -745,10 +745,26 @@ class _KernelUnitResynthesizerContextImpl |
@override |
InterfaceType getInterfaceType( |
ElementImpl context, kernel.Supertype kernelType) { |
+ if (kernelType.classNode.isEnum) { |
+ return null; |
Brian Wilkerson
2017/08/31 19:54:15
Does this mean that we won't be able to resynthesi
scheglov
2017/08/31 19:55:23
We can resynthesize enums.
We just should not allo
|
+ } |
return _getInterfaceType( |
context, kernelType.className.canonicalName, kernelType.typeArguments); |
} |
+ @override |
+ List<InterfaceType> getInterfaceTypes( |
+ ElementImpl context, List<kernel.Supertype> types) { |
+ var interfaceTypes = <InterfaceType>[]; |
+ for (kernel.Supertype kernelType in types) { |
+ InterfaceType interfaceType = getInterfaceType(context, kernelType); |
+ if (interfaceType != null) { |
+ interfaceTypes.add(interfaceType); |
+ } |
+ } |
+ return interfaceTypes; |
+ } |
+ |
@override |
ConstructorElementImpl getRedirectedConstructor( |
kernel.Constructor kernelConstructor, kernel.Procedure kernelFactory) { |