aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/customArgs/overloadsOnAbstractTypes.scala
blob: 0c9ed12bb2006197fe2bb14709bf06385f216e9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
class Test1 {
  type A
  type B <: A

  def foo(): A = ???
  def foo(): A = ??? // error

  def bar(): A = ???
  def bar(): B = ??? // error
}

class Test2 {
  type A
  type B <: A

  def foo(x: A) = ???
  def foo(x: A) = ??? // error

  def bar(x: A) = ???
  def bar(x: B) = ??? // error
}