summaryrefslogtreecommitdiff
path: root/test/pending/neg/t3633/test/Test.scala
blob: 395a6be6f4e435ea4a7b63a7ffd707f1c92c9f8e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package test

final class Test extends PackageProtected {
  def bar = foo
}

package another {
  object Main {
    def t1(t: Test) {
      // Can always be replicated.
      println(t.foo)
    }
    def t2(t: Test) {
      // Conditions to replicate: must use -optimise, class Test must be final
      println(t.bar)
      //@noinline is a usable workaround
    }
    def main(args: Array[String]) {
      t1(new Test)
      t2(new Test)
    }
  }
}