Permalink
Browse files

Moar tests

  • Loading branch information...
1 parent 988908b commit c53b51dad5a1fde69cfc1bbd3d4612f073fb5d18 Amos Wenger committed Jun 7, 2012
Showing with 23 additions and 0 deletions.
  1. +23 −0 samples/glassx3.ooc
View
@@ -0,0 +1,23 @@
+
+Glass: class <X> {
+
+ init: func (value: X) {
+ X name println()
+ match X {
+ case c: Char => "%c" printfln(c)
+ case i: Int => "%d" printfln(i)
+ case o: Object => "%p" printfln(o)
+ }
+ }
+
+}
+
+#specialize Glass<Int>
+
+main: func {
+ Glass<Char> new('c')
+ Glass<Int> new(42 as Int)
+ Glass<Object> new(null)
+}
+
+

0 comments on commit c53b51d

Please sign in to comment.