anchor.diff:          int annotationIdx = 0;
           library.metadata.forEach((Annotation ann) {
             if (ann.element is ConstructorElement &&
  -              getQualifiedName(
  -                  (ann.element as ConstructorElement).enclosingElement.type) ==
  -                  'di.annotations.Injectables') {
  +            getQualifiedName(
  +                (ann.element as ConstructorElement).enclosingElement.type) ==
  +                'di.annotations.Injectables') {
               var listLiteral =
                   library.metadata[annotationIdx].arguments.arguments.first;
  -            for (Expression element in listLiteral.elements) {
  -              typeFactoryTypes
  -                 .add((element as SimpleIdentifier).bestElement as ClassElement);
  +            for (Expression expr in listLiteral.elements) {
  +              Element element = (expr as SimpleIdentifier).bestElement;
  +              if (element == null) {
  +                throw 'Unable to resolve type "$expr" from @Injectables '
  +                      'in ${library.element.source}';
  +              }
  +              typeFactoryTypes.add(element as ClassElement);
               }
             }
             annotationIdx++;
  
positive.code:         'typeFactories[${resolveClassIdentifier(clazz.type)}] = (f) => ');
      factories.write('new ${resolveClassIdentifier(clazz.type)}(');
      ConstructorElement constr =
          clazz.constructors.firstWhere((c) => c.name.isEmpty);
      factories.write(constr.parameters.map((param) =>
          'f(${resolveClassIdentifier(param.type)})').join(', '));
      factories.write(');\n');
    });
    StringBuffer code = new StringBuffer();
  
negative.code:   StringBuffer factories = new StringBuffer();
  
    String resolveClassIdentifier(InterfaceType type) {
      if (type.element.library.isDartCore) {
        return type.name;
      }
      String import = typeToImport[getCanonicalName(type)];
  