{"description":"Kotlin\u3067\u306f\u3001\u4e00\u3064\u306e\u5f0f\u304b\u3089\u306a\u308b\u95a2\u6570\u306f fun add(x: Int, y: Int): Int = x + y \u306e\u3088\u3046\u306b\u660e\u793a\u7684\u306areturn\u3092\u5fc5\u8981\u3068\u3057\u307e\u305b\u3093\u3002\u6b21\u306e\u3088\u3046\u306b\u8907\u6570\u306e\u5f0f\u304b\u3089\u306a\u308b\u95a2\u6570\u5b9a\u7fa9\u3067\u306freturn\u304c\u5fc5\u9808\u3068\u306a\u308a\u307e\u3059\u3002 fun printAndAdd(x: Int, y: Int): Int { val k = x + y println(k) return k //\u5fc5\u9808 } \u3053\u306e\u5236\u9650\u306e\u7406\u7531\u306b\u3064\u3044\u3066\u3001Kotlin\u306e\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u3067\u306f Kotlin does not infer return types for functions with block bodies because s\u2026","provider_url":"https://hatena.blog","author_name":"kmizushima","image_url":null,"height":"190","provider_name":"Hatena Blog","blog_url":"https://kmizu.hatenablog.com/","type":"rich","author_url":"https://blog.hatena.ne.jp/kmizushima/","version":"1.0","width":"100%","url":"https://kmizu.hatenablog.com/entry/2016/03/22/134828","title":"Kotlin\u306e\u30d6\u30ed\u30c3\u30af\u304b\u3089\u306a\u308b\u95a2\u6570\u5b9a\u7fa9\u3067return\u3092\u66f8\u304b\u306a\u304f\u3066\u826f\u3044\u3088\u3046\u306b\u3059\u308b","blog_title":"kmizu\u306e\u65e5\u8a18","published":"2016-03-22 13:48:28","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkmizu.hatenablog.com%2Fentry%2F2016%2F03%2F22%2F134828\" title=\"Kotlin\u306e\u30d6\u30ed\u30c3\u30af\u304b\u3089\u306a\u308b\u95a2\u6570\u5b9a\u7fa9\u3067return\u3092\u66f8\u304b\u306a\u304f\u3066\u826f\u3044\u3088\u3046\u306b\u3059\u308b - kmizu\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":["Kotlin"]}