Advertisement
Guest User

Дичь #2

a guest
Oct 4th, 2015
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.36 KB | None | 0 0
  1. trait A {
  2.   def goo(): Int
  3.   def foo(): Int
  4. }
  5. object A {
  6.   def foo(a: A): Int = 1
  7.   def $init$(a: A): Unit = ???
  8. }
  9.  
  10. class B extends A {
  11.   override def foo(): Int = A.foo(this)
  12.   override def goo(): Int = 2
  13.   def B(): Unit = ???
  14. }
  15.  
  16. class C$ {
  17.   def m(): Int = 1
  18. }
  19.  
  20. object C$ {
  21.   val MODULE$ = new C$()
  22. }
  23.  
  24. object C {
  25.   def m() = C$.MODULE$.m()
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement