We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d382541 commit d264006Copy full SHA for d264006
tests/pos/into-separate/Test_2.scala
@@ -0,0 +1,16 @@
1
+//> using options -feature
2
+package test
3
+import language.experimental.into
4
+
5
+object Test:
6
+ given Conversion[Int, C] = C(_)
7
8
+ def f(x: T) = ()
9
+ f(1) // ok
10
11
+ given stringToKeyword: Conversion[String, Keyword] = Keyword(_)
12
13
+ val dclKeywords = Set[Keyword]("def", "val") // ok
14
+ val keywords = dclKeywords + "if" + "then" + "else" // ok
15
16
tests/pos/into-separate/classes_1.scala
@@ -0,0 +1,8 @@
+into trait T
+class C(x: Int) extends T
+into class Keyword(str: String)
tests/warn/into-inferred.scala
0 commit comments