Created
          August 1, 2013 20:13 
        
      - 
      
- 
        Save rjhall/6134811 to your computer and use it in GitHub Desktop. 
    pwn.scala
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | scala> abstract class A { def holler : String; println(holler) } | |
| defined class A | |
| scala> class B extends A { def holler = "holler" } | |
| defined class B | |
| scala> new B() | |
| holler | |
| res0: B = B@54011d95 | |
| scala> class C extends A { val pwn = "thanks odersky"; def holler = pwn } | |
| defined class C | |
| scala> new C() | |
| null | |
| res1: C = C@27e3bfb6 | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment