vsapsai added inline comments.

================
Comment at: clang/test/SemaObjC/block-type-safety.m:170
+    genericBlockWithParam = blockWithParam;
+    blockWithParam = genericBlockWithParam; // expected-error {{incompatible 
block pointer types assigning to 'void (^)(NSAllArray *)' from 'void 
(^)(id<Foo>)'}}
+    return 0;
----------------
jyknight wrote:
> It seems a shame to disallow this assignment in the compatibility mode, when 
> it ought to be allowed.
> 
> Perhaps it would be better to allow both directions for parameters when the 
> compatibility flag is set? (That is: the compat mode flag would only cause 
> the compiler to allow _more_ things than it otherwise should.)
> 
> 
Hmm, sounds like an interesting idea. It can make the transitioning to the new 
compiler version less disruptive. Need to think more if it has any undesirable 
consequences. So far my only objection is that it makes things less consistent. 
But given the current state of block type checking that argument isn't 
particularly compelling.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79511/new/

https://reviews.llvm.org/D79511



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to