Scala pattern matching with lowercase variable name

前端 未结 4 1256
没有蜡笔的小新
没有蜡笔的小新 2020-11-30 08:17

I found that when using pattern matching with alternatives (for strings), Scala accepts variables starting with upper case (in the example below, MyValue1 and <

4条回答
  •  温柔的废话
    2020-11-30 08:23

    If it helps, I just posted an article on this topic a week or so @ http://asoftsea.tumblr.com/post/2102257493/magic-match-sticks-and-burnt-fingers

提交回复
热议问题