Skip to content

Instantly share code, notes, and snippets.

@nddrylliog
Created August 29, 2010 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nddrylliog/d32adb57daafbdf86536 to your computer and use it in GitHub Desktop.
Save nddrylliog/d32adb57daafbdf86536 to your computer and use it in GitHub Desktop.
Abs: abstract class {}
Imp: class extends Abs {}
// these two lines should work properly (ie. display "Abs! Imp!"
//operator == (a, b: Imp) { "Imp!" println() }
//operator == (a, b: Abs) { "Abs!" println() }
// and these two should work as well
operator == (a, b: Abs) { "Abs!" println() }
operator == (a, b: Imp) { "Imp!" println() }
a, b: Abs
a == b
c, d: Imp
c == d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment