Created
August 6, 2019 04:38
-
-
Save kmizu/a13592fafc413fe7d24475288061f84e to your computer and use it in GitHub Desktop.
Large String Interpolation Problem fixed in https://github.com/scala/scala/pull/8315/files
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
$ sbt run | |
... | |
[info] Running LargeStringInterpolation | |
[error] (run-main-0) java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String | |
[error] java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String | |
[error] at LargeStringInterpolation$.delayedEndpoint$LargeStringInterpolation$1(LargeStringInterpolation.scala:4) | |
[error] at LargeStringInterpolation$delayedInit$body.apply(LargeStringInterpolation.scala:1) | |
[error] at scala.Function0.apply$mcV$sp(Function0.scala:39) | |
[error] at scala.Function0.apply$mcV$sp$(Function0.scala:39) | |
[error] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17) | |
[error] at scala.App.$anonfun$main$1$adapted(App.scala:80) | |
[error] at scala.collection.immutable.List.foreach(List.scala:392) | |
[error] at scala.App.main(App.scala:80) | |
[error] at scala.App.main$(App.scala:78) | |
[error] at LargeStringInterpolation$.main(LargeStringInterpolation.scala:1) | |
[error] at LargeStringInterpolation.main(LargeStringInterpolation.scala) | |
[error] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
[error] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | |
[error] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | |
[error] at java.lang.reflect.Method.invoke(Method.java:498) |
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
object LargeStringInterpolation extends App { | |
val a = 1 | |
val s32 = s"$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a" | |
val s33 = s"$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a" | |
val s34 = s"$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a" | |
val s35 = s"$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a" | |
println("Hello") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment