Skip to content

Commit 2e4c2ad

Browse files
Merge pull request #4910 from dotty-staging/add-regression-tests-from-4526
Add some regression tests for #4526
2 parents f84113d + e94927c commit 2e4c2ad

File tree

4 files changed

+31
-0
lines changed

4 files changed

+31
-0
lines changed

tests/pos/i4526a.decompiled

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/** Decompiled from out/posTestFromTasty/pos/i4526a/bar/Foo.class */
2+
package bar {
3+
class Foo() {
4+
protected[bar] def foo(): scala.Int = 0
5+
}
6+
}

tests/pos/i4526a.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package bar
2+
class Foo {
3+
protected[bar] def foo(): Int = 0
4+
}

tests/pos/i4526b.decompiled

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/** Decompiled from out/posTestFromTasty/pos/i4526b/Foo.class */
2+
class Foo() {
3+
def justdoit(f: scala.Either[scala.Int, scala.Predef.String]): scala.Predef.String = {
4+
f match {
5+
case scala.Left(i) =>
6+
i.toString()
7+
case scala.Right(s) =>
8+
(s: java.lang.String)
9+
}
10+
}
11+
}

tests/pos/i4526b.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class Foo {
2+
3+
def justdoit (f : Either[Int,String]) : String = {
4+
f match {
5+
case Left(i) => i.toString
6+
case Right(s) => s
7+
}
8+
9+
}
10+
}

0 commit comments

Comments
 (0)