Last active
February 26, 2021 22:24
-
-
Save deanwampler/f484edeb12620372855cb0baaf5502a3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Adapted from | |
// https://github.com/deanwampler/programming-scala-book-code-examples/blob/master/src/script/scala/progscala3/typesystem/deptypes/DependentTypesSimple.scala | |
import scala.compiletime.ops.string.* // Scala 2 uses _ as the wild card, which you can still use | |
val s1: "ab" + "cd" = "abcd" | |
val bad2: "ab" + "cd" = "abcdef" // ERROR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment