Selectively disable subsumption in Scala? (correctly type List.contains)

前端 未结 6 1809
北荒
北荒 2020-12-16 11:04
List(\"a\").contains(5)

Because an Int can never be contained in a list of String

6条回答
  •  庸人自扰
    2020-12-16 11:59

    I think I have a legitimate solution to at least some of the problem posted here - I mean, the issue with List("1").contains(1): https://docs.google.com/document/d/1sC42GKY7WvztXzgWPGDqFukZ0smZFmNnQksD_lJzm20/edit

提交回复
热议问题