表é¡ã®éãã§ããã¨ãããããKotlinçã¨Scalaçã®ã³ã¼ãè²¼ãã¾ãã gist.github.com gist.github.com ãããã®ã³ã¼ãã§ã¯ã両æ¹ã¨ãæ示çãªãã¦ã³ãã£ã¹ãããã®ä»ã®æãç©´ã使ã£ã¦ããªãã®ã§ãå®è¡ãã¦ã決ãã¦ClassCastExceptionãèµ·ãã¦ã¯ãããªãã®ã§ãããå®éã«å®è¡ããã¨ClassCastExceptionãèµ·ãã¦ãã¾ãã¾ãã ãã¦ãããã¯ã³ã³ãã¤ã©ã®å®è£ ã®ãã°ã§ããããè¨èªä»æ§ã®ãã°ã§ãããã®ã§ãããã¡ãã£ã¨çç±ã説æãã¦ã¿ããã¨æãã¾ãã class B extends A with Comparable[B] { def compareTo(b: B): Int = 0 } ä¸è¨ã®ã³ã¼ããã³ã³ãã¤ã«ããã¨ãä¸è¨ã®ã³ã¼ããçæããã¾ããããã§ãint compareTo(java.lang.Object)ã¨ããã¡ã½ããã å®ç¾©ããã¦ãã
{{#tags}}- {{label}}
{{/tags}}