Skip to content

Removing method while making trait package-private is NOK #699

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

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
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ object Analyzer {
}

def analyze(oldclazz: ClassInfo, newclazz: ClassInfo, log: Logging, excludeAnnots: List[AnnotInfo]): List[Problem] = {
if ((if (newclazz.isModuleClass) newclazz.module else newclazz).isScopedPrivate) Nil
if ((if (oldclazz.isModuleClass) oldclazz.module else oldclazz).isScopedPrivate) Nil
else {
TemplateChecker.check(oldclazz, newclazz) match {
case p @ Some(_: IncompatibleTemplateDefProblem | _: CyclicTypeReferenceProblem) =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
object App {
def main(args: Array[String]): Unit = {
println(foo.Lib.doIt)
println(new foo.Foo().bar(1))
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
method bar(Int)Int in class foo.Foo does not have a correspondent in new version
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package foo

class Foo {
def bar(x: Int) = x
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,3 @@ package foo
private[foo] class Foo {
def bar(x: Int, y: Int) = x + y
}

object Lib {
val foo = new Foo
def doIt = foo.bar(1, 0)
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
object App {
def main(args: Array[String]): Unit = {
println(new bar.A() {}.foo(App))
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
method foo(java.lang.Object)java.lang.Object in trait bar.A does not have a correspondent in new version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
method foo(java.lang.Object)java.lang.Object in interface bar.A does not have a correspondent in new version
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package bar
trait A {
def foo[T](x: T): T = x
def baz[T](x: T): T = x
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package bar
private[bar] trait A {
def baz[T](x: T): T = x
}