Skip to content

build and test against scala 3.7.1 (placeholder) #2227

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,7 @@ object ExplicitResultTypesBase {
private val g = 1
private def h(a: Int) = ""
private var i = 22
private implicit var j = 1
val k = (1, "msg")
implicit val L = List(1)
implicit val M = Map(1 -> "STRING")
implicit def D = 2
implicit def tparam[T](e: T) = e
implicit def tparam2[T](e: T) = List(e)
implicit def tparam3[T](e: T) = Map(e -> e)
class implicitlytrick {
implicit val s: _root_.java.lang.String = "string"
implicit val x = implicitly[String]
}
def comment(x: Int) =
// comment
x + 2
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
rules = ExplicitResultTypes
ExplicitResultTypes.memberKind = [Val, Def, Var]
ExplicitResultTypes.memberVisibility = [Public, Protected]
*/
package test.explicitResultTypes

import scala.language.implicitConversions

object ExplicitResultTypesImplicit {
private implicit var j = 1
implicit val L = List(1)
implicit val M = Map(1 -> "STRING")
implicit def D = 2
implicit def tparam[T](e: T) = e
implicit def tparam2[T](e: T) = List(e)
implicit def tparam3[T](e: T) = Map(e -> e)
class implicitlytrick {
implicit val s: _root_.java.lang.String = "string"
implicit val x = implicitly[String]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
rules = ExplicitResultTypes
ExplicitResultTypes.memberKind = [Val, Def, Var]
ExplicitResultTypes.memberVisibility = [Public, Protected]
*/
package test.explicitResultTypes

import scala.language.implicitConversions

object ExplicitResultTypesBase {
def none[T] = None.asInstanceOf[Option[T]]
val a = 1 + 2
def b() = "a" + "b"
var c = 1 == 1
protected val d = 1.0f
protected def e(a: Int, b: Double) = a + b
protected var f = (x: Int) => x + 1
val f0 = () => 42
private val g = 1
private def h(a: Int) = ""
private var i = 22
val k = (1, "msg")
def comment(x: Int) =
// comment
x + 2
object ExtraSpace {
def * = "abc".length
def ! = "abc".length
def foo_ = "abc".length
def `x` = "abc".length
def `x ` = "abc".length
}
locally {
implicit val Implicit = scala.concurrent.Future.successful(2)
val Var = scala.concurrent.Future.successful(2)
val Val = scala.concurrent.Future.successful(2)
def Def = scala.concurrent.Future.successful(2)
}
object unicode {
object `->` {
def unapply[S](in: (S, S)): Option[(S, S)] = Some(in)
}
val `→` = `->`
}
def tuple = null.asInstanceOf[((Int, String)) => String]
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,7 @@ object ExplicitResultTypesBase {
private val g = 1
private def h(a: Int) = ""
private var i = 22
private implicit var j = 1
val k: (Int, String) = (1, "msg")
implicit val L: List[Int] = List(1)
implicit val M: Map[Int,String] = Map(1 -> "STRING")
implicit def D = 2
implicit def tparam[T](e: T) = e
implicit def tparam2[T](e: T): List[T] = List(e)
implicit def tparam3[T](e: T): Map[T,T] = Map(e -> e)
class implicitlytrick {
implicit val s: _root_.java.lang.String = "string"
implicit val x = implicitly[String]
}
def comment(x: Int): Int =
// comment
x + 2
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

package test.explicitResultTypes

import scala.language.implicitConversions

object ExplicitResultTypesImplicit {
private implicit var j = 1
implicit val L: List[Int] = List(1)
implicit val M: Map[Int,String] = Map(1 -> "STRING")
implicit def D = 2
implicit def tparam[T](e: T) = e
implicit def tparam2[T](e: T): List[T] = List(e)
implicit def tparam3[T](e: T): Map[T,T] = Map(e -> e)
class implicitlytrick {
implicit val s: _root_.java.lang.String = "string"
implicit val x = implicitly[String]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

package test.explicitResultTypes

import scala.language.implicitConversions
import scala.concurrent.Future

object ExplicitResultTypesBase {
def none[T]: Option[T] = None.asInstanceOf[Option[T]]
val a: Int = 1 + 2
def b(): String = "a" + "b"
var c: Boolean = 1 == 1
protected val d = 1.0f
protected def e(a: Int, b: Double): Double = a + b
protected var f: Int => Int = (x: Int) => x + 1
val f0: () => Int = () => 42
private val g = 1
private def h(a: Int) = ""
private var i = 22
val k: (Int, String) = (1, "msg")
def comment(x: Int): Int =
// comment
x + 2
object ExtraSpace {
def * : Int = "abc".length
def ! : Int = "abc".length
def foo_ : Int = "abc".length
def `x`: Int = "abc".length
def `x `: Int = "abc".length
}
locally {
implicit val Implicit: Future[Int] = scala.concurrent.Future.successful(2)
val Var = scala.concurrent.Future.successful(2)
val Val = scala.concurrent.Future.successful(2)
def Def = scala.concurrent.Future.successful(2)
}
object unicode {
object `->` {
def unapply[S](in: (S, S)): Option[(S, S)] = Some(in)
}
val `→` = `->`
}
def tuple: ((Int, String)) => String = null.asInstanceOf[((Int, String)) => String]
}
Loading