aboutsummaryrefslogblamecommitdiff
path: root/tests/pos/t1798.scala
blob: 1624e3025e06f6fc76346f6a85a0aa6b20076d5f (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                             
object Foo { private def bar(): Int = 55 }
class Foo(x: Int) { def this() = this(Foo.bar()) }

/*
 * scalac28 a.scala
a.scala:2: error: method bar cannot be accessed in object Foo
class Foo(x: Int) { def this() = this(Foo.bar()) }
                                          ^
one error found
*/