{"description":"\u4efb\u610f\u306e\u578bA\u306e\u62e1\u5f35\u95a2\u6570\u306e\u4e2d\u3067\u30a8\u30f3\u30af\u30ed\u30fc\u30b8\u30f3\u30b0\u578bB\u306e\u30e1\u30f3\u30d0\u3092\u4f7f\u3044\u305f\u3044\u3068\u304d\u3001 \u6b21\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u306f\u81ea\u7136\u3067\u3059\u304c\u3001foo\u306fB\u306e\u4e2d\u3067\u3057\u304b\u4f7f\u3048\u306a\u304f\u3066\u4e0d\u4fbf\u3067\u3059\u3002 When we want to use a enclosing type B's members in any type A's extension function, the following code looks natural, but it's inconvenient that foo can be called in only B. class B { fun A.foo() {...} } \u4e0b\u8a18\u306e\u3088\u3046\u306b\u540c\u3058\u5b9a\u7fa9\u3092\u7e70\u308a\u8fd4\u3055\u306a\u304f\u3066\u306f\u306a\u308a\u307e\u305b\u2026","author_url":"https://blog.hatena.ne.jp/ngsw_taro/","image_url":null,"width":"100%","url":"https://taro.hatenablog.jp/entry/2016/02/02/141551","type":"rich","author_name":"ngsw_taro","version":"1.0","published":"2016-02-02 14:15:51","blog_url":"https://taro.hatenablog.jp/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftaro.hatenablog.jp%2Fentry%2F2016%2F02%2F02%2F141551\" title=\"&quot;double context extension&quot; pattern \uff08\u547d\u540d\u9069\u5f53\uff09 #kotlin - \u7b97\u8b5c\u738b\u306b\u304a\u308c\u306f\u306a\u308b!!!!\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_title":"\u7b97\u8b5c\u738b\u306b\u304a\u308c\u306f\u306a\u308b!!!!","title":"\"double context extension\" pattern \uff08\u547d\u540d\u9069\u5f53\uff09 #kotlin","height":"190","categories":["Kotlin","\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0"],"provider_url":"https://hatena.blog","provider_name":"Hatena Blog"}