summaryrefslogblamecommitdiff
path: root/test/files/neg/t3873.scala
blob: b27b4e9c9dfd8e15bf7c173ed9aed9744a1be1b9 (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                   
                                          
 
class A {
  class B
  def b: B = new B
}

object Test {
  def wrongf(a: A)(b: a.B): a.B = b

  val a = new A
  wrongf(a)(a.b)
  wrongf(new A)(a.b) // should not compile
}