-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shapeless' narrow method crashes the compiler 2.12.x (only in REPL) #10358
Comments
n4to4
changed the title
Shapeless'
Shapeless' narrow method crashes the compiler 2.12.x (only in REPL)
Jun 6, 2017
narrow
method crashes the compiler 2.12.x (only in REPL)
It's the same result with It trips up on a lazy val that is not ordinarily visible.
Mr Fields comments, "Lazy vals do not receive constant types (anymore)." |
Notably, this seems to work in Ammonite $ amm
Loading...
Welcome to the Ammonite Repl 1.0.0-RC6
(Scala 2.12.2 Java 1.8.0_112)
If you like Ammonite, please support our development at www.patreon.com/lihaoyi
@ import $ivy.`com.chuusai::shapeless:2.3.2`
import $ivy.$
@ import shapeless.syntax.singleton._
import shapeless.syntax.singleton._
@ 42.narrow
res2: 42 = 42 Not sure what we're doing differently; Ammonite compiles these things in pretty simple |
let's consolidate at #10768 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Scala version: 2.12.2 and 2.12.1
Shapeless'
42.narrow
seems to crash the compiler only in REPL.It seems fine when running in a program with
sbt run
.build.sbt:
How to reproduce:
The text was updated successfully, but these errors were encountered: