fun nested() {
  fun foo() {}
  fun foo() {}

  ;
}

fun nested() {}

class Bar {}
class Bar {}

// @expect-errors:
// | 3:2: duplicate definition of function 'foo'
// | 8:0: duplicate definition of function 'nested'
// | 11:0: duplicate definition of class 'Bar'