Last active
October 9, 2021 23:15
-
-
Save deanwampler/157823ded061528af8eefe055af4861f 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.int.S // In 3.0.0, it's scala.compiletime.S !! | |
val s1: S[0] = 1 | |
val s2a: S[S[0]] = 2 | |
val s2b: S[1] = 2 | |
val s3a: S[S[S[0]]] = 3 | |
val s3b: S[2] = 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment