In Objective-C, does the binding of method really happen at “run-time”?

前端 未结 4 1442
忘了有多久
忘了有多久 2021-01-24 00:41

I heard that Objective-C is influenced by the \"message passing mechanism\" of SmallTalk.

Objective-C, like Smalltalk, can use dynamic typing: an object

4条回答
  •  醉梦人生
    2021-01-24 01:01

    I figured out the reason finally..

    It throw errors during compiling because -Werror flag is included, which will turn warning into error..

    http://clang.llvm.org/docs/UsersManual.html#cmdoption-Werror

    After I delete -Werror flag, everything works as expected and the error only happens at run-time.

提交回复
热议问题