Skip to content
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

add -Xsource:3 option #366

Merged
merged 1 commit into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions io/src/main/scala/sbt/internal/io/Milli.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import scala.util.control.NonFatal
private abstract class Stat[Time_T](size: Int) extends NativeMapped {
val buffer = ByteBuffer.allocate(size).order(ByteOrder.nativeOrder())

def fromNative(nativeValue: Object, context: FromNativeContext) =
def fromNative(nativeValue: Object, context: FromNativeContext): Nothing =
throw new UnsupportedOperationException("Not supported.")

def toNative(): Object = buffer
Expand Down Expand Up @@ -149,7 +149,7 @@ private abstract class PosixMilliInt[Interface <: Posix[Int]: ClassTag]
//
private abstract class TimeSpec2[Time_T] extends NativeMapped {
val buffer: Array[Time_T]
def fromNative(nativeValue: Object, context: FromNativeContext) =
def fromNative(nativeValue: Object, context: FromNativeContext): Nothing =
throw new UnsupportedOperationException("Not supported.")
def toNative(): Object = buffer
def nativeType(): Class[Array[Time_T]] = classOf[Array[Time_T]]
Expand Down
2 changes: 1 addition & 1 deletion io/src/main/scala/sbt/internal/nio/TimeSource.scala
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private[nio] trait Deadline extends Comparable[Deadline] {
private[nio] object Deadline {
def now(implicit timeSource: TimeSource): Deadline = timeSource.now
private[nio] object Inf extends Deadline {
override val value = Duration.Inf
override val value: Duration = Duration.Inf
override def isOverdue: Boolean = false
override def compareTo(o: Deadline): Int = this.value compareTo o.value
override def +(duration: FiniteDuration): Deadline = this
Expand Down
2 changes: 2 additions & 0 deletions project/HouseRulesPluglin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ object HouseRulesPlugin extends AutoPlugin {
})
.value
.toList,
scalacOptions ++= "-Xsource:3".ifScala213OrMinus.value.toList,
scalacOptions ++= "-Wconf:msg=package object inheritance is deprecated:warning".ifScala213OrMinus.value.toList,
scalacOptions ++= "-Yno-adapted-args".ifScala212OrMinus.value.toList,
scalacOptions ++= "-Ywarn-dead-code".ifScala213OrMinus.value.toList,
scalacOptions ++= "-Ywarn-numeric-widen".ifScala213OrMinus.value.toList,
Expand Down