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 7ce031b commit 2afffccCopy full SHA for 2afffcc
tests/pos/forwardCompat-exportInExtension/Lib_1_r3.0.scala
@@ -0,0 +1,13 @@
1
+case class ShortString(value: String)
2
+
3
+class StringOps(x: ShortString):
4
+ def *(n: Int): ShortString = ???
5
+ def capitalize: ShortString = ???
6
7
+object stringsyntax:
8
9
+ extension (x: ShortString)
10
+ def take(n: Int): ShortString = ???
11
+ def drop(n: Int): ShortString = ???
12
+ private def moreOps = StringOps(x)
13
+ export moreOps.*
tests/pos/forwardCompat-exportInExtension/Test_2_c3.0.2.scala
@@ -0,0 +1,7 @@
+import stringsyntax.*
+def test =
+ ShortString("Hello").take(2)
+ ShortString("Hello").drop(3)
+ ShortString("Hello") * 5
+ ShortString("Hello").capitalize
0 commit comments