anchor.diff:          }
         }
       } else if (element is FunctionElement) {
  -      Element enclosingElement = element.enclosingElement;
  +      Element enclosingElement = element?.enclosingElement;
         if (enclosingElement is CompilationUnitElement) {
           if (element.library.name == 'dart.ffi') {
             if (element.name == 'sizeOf') {
  
positive.code:   }
  
    void _validateAllocate(FunctionExpressionInvocation node) {
      final DartType dartType = node.typeArgumentTypes[0];
      if (!_isValidFfiNativeType(dartType, true, true)) {
        final AstNode errorNode = node;
  
negative.code:     // No classes from the FFI may be explicitly implemented.
      void checkSupertype(TypeName typename, FfiCode subtypeOfFfiCode,
          FfiCode subtypeOfStructCode) {
        final superName = typename.name?.staticElement?.name;
        if (superName == _allocatorClassName) {
          return;
        }
  