Created
November 7, 2017 19:46
-
-
Save lhohan/c7e8096c3486c6d810283d4753049c4a to your computer and use it in GitHub Desktop.
This file contains 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
// does not compile: | |
scalaVersion := "2.12.4" | |
// does compile: | |
//scalaVersion := "2.12.3" |
This file contains 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
import a.Handler | |
import a.Handler.CONST | |
class HandlerImpl extends Handler { | |
def doSomethingWithConst: String = { | |
CONST | |
} | |
} |
This file contains 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
package a; | |
public abstract class Handler { | |
protected static final String CONST = "abc123"; | |
} |
This file contains 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
$ java -version | |
java version "1.8.0_102" | |
Java(TM) SE Runtime Environment (build 1.8.0_102-b14) | |
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode) | |
$ sbt | |
[info] Loading project definition from /Users/hho/dev/scala_2.12.4_bug/project | |
[info] Loading settings from build.sbt ... | |
[info] Set current project to scala_2-12-4_bug (in build file:/Users/hho/dev/scala_2.12.4_bug/) | |
[info] sbt server started at 127.0.0.1:4307 | |
sbt> show scalaVersion | |
[info] 2.12.4 | |
sbt> ;clean;compile | |
[success] Total time: 0 s, completed Nov 7, 2017 8:18:10 PM | |
[info] Updating {file:/Users/hho/dev/scala_2.12.4_bug/}scala_2-12-4_bug... | |
[info] Done updating. | |
[info] Compiling 1 Scala source and 1 Java source to /Users/hho/dev/scala_2.12.4_bug/target/scala-2.12/classes ... | |
[error] /Users/hho/dev/scala_2.12.4_bug/src/main/scala/HandlerImpl.scala:7:5: not found: value CONST | |
[error] CONST | |
[error] ^ | |
[error] one error found | |
[error] (compile:compileIncremental) Compilation failed | |
[error] Total time: 3 s, completed Nov 7, 2017 8:18:13 PM | |
sbt> set scalaVersion := "2.12.3" | |
[info] Defining *:scalaVersion | |
[info] The new value will be used by *:allDependencies, *:crossScalaVersions and 14 others. | |
[info] Run `last` for details. | |
[info] Reapplying settings... | |
[info] Set current project to scala_2-12-4_bug (in build file:/Users/hho/dev/scala_2.12.4_bug/) | |
sbt> show scalaVersion | |
[info] 2.12.3 | |
sbt> ;clean;compile | |
[success] Total time: 0 s, completed Nov 7, 2017 8:18:29 PM | |
[info] Updating {file:/Users/hho/dev/scala_2.12.4_bug/}scala_2-12-4_bug... | |
[info] Done updating. | |
[info] Compiling 1 Scala source and 1 Java source to /Users/hho/dev/scala_2.12.4_bug/target/scala-2.12/classes ... | |
[info] Done compiling. | |
[success] Total time: 2 s, completed Nov 7, 2017 8:18:31 PM | |
sbt> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment