summary refs log tree commit diff stats
path: root/tests/method/tmultim6.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/method/tmultim6.nim')
-rw-r--r--tests/method/tmultim6.nim30
1 files changed, 0 insertions, 30 deletions
diff --git a/tests/method/tmultim6.nim b/tests/method/tmultim6.nim
deleted file mode 100644
index 2c622b832..000000000
--- a/tests/method/tmultim6.nim
+++ /dev/null
@@ -1,30 +0,0 @@
-discard """
-  output: "collide: unit, thing | collide: unit, thing | collide: thing, unit |"
-"""
-# Test multi methods
-
-type
-  Thing = object {.inheritable.}
-  Unit[T] = object of Thing
-    x: T
-  Particle = object of Thing
-    a, b: int
-
-method collide(a, b: Thing) {.base, inline.} =
-  quit "to override!"
-
-method collide[T](a: Thing, b: Unit[T]) {.inline.} =
-  write stdout, "collide: thing, unit | "
-
-method collide[T](a: Unit[T], b: Thing) {.inline.} =
-  write stdout, "collide: unit, thing | "
-
-proc test(a, b: Thing) {.inline.} =
-  collide(a, b)
-
-var
-  a: Thing
-  b, c: Unit[string]
-collide(b, Thing(c))
-test(b, c)
-collide(a, b)