Skip to content

Commit 084901c

Browse files
committed
Check for java8.
1 parent d28009b commit 084901c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

compiler/src/dotty/tools/dotc/config/CompilerCommand.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ object CompilerCommand extends DotClass {
116116
ctx.echo(versionMsg)
117117
Nil
118118
} else if (!Properties.isJavaAtLeast("1.8")) {
119-
ctx.error("Dotty requires Java 8 or newer to run")
119+
ctx.error("Dotty requires Java 8 to run")
120120
Nil
121121
}
122122
else if (shouldStopWithInfo) {

compiler/src/dotty/tools/dotc/config/Properties.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,10 @@ trait PropertiesTrait {
128128
*/
129129
def isJavaAtLeast(version: String) = {
130130
val okVersions = version match {
131-
case "1.5" => List("1.5", "1.6", "1.7")
132-
case "1.6" => List("1.6", "1.7")
133-
case "1.7" => List("1.7")
131+
case "1.5" => List("1.5", "1.6", "1.7", "1.8")
132+
case "1.6" => List("1.6", "1.7", "1.8")
133+
case "1.7" => List("1.7", "1.8")
134+
case "1.8" => List("1.8")
134135
case _ => Nil
135136
}
136137
okVersions exists (javaVersion startsWith _)

0 commit comments

Comments
 (0)