Skip to content

Instantly share code, notes, and snippets.

@deanwampler
Created April 28, 2021 13:25
Show Gist options
  • Save deanwampler/69c632b80645180d406f3f4945890443 to your computer and use it in GitHub Desktop.
Save deanwampler/69c632b80645180d406f3f4945890443 to your computer and use it in GitHub Desktop.
// Adapted from the Programming Scala, Third Edition code examples
// https://github.com/deanwampler/programming-scala-book-code-examples
// src/script/scala/progscala3/patternmatching/Matchable.scala
val iarray = IArray(1,2,3,4,5)
iarray match
case a: Array[Int] => a(2) = 300 // Scala 3 warning!!
println(iarray)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment