summaryrefslogtreecommitdiffstats
path: root/tests/019/pct-fun.tl
blob: eae0d9bb907fdaadeac095973a419e1fc1187139 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
(load "../common")

(defstruct foo ()
  (:init (me) (prinl %fun%))
  (:fini (me) (prinl %fun%))
  (:postinit (me) (prinl %fun%))
  (:postfini (me) (prinl %fun%))
  (:method foo (me) (prinl %fun%)))

(defmeth foo bar (me)
  (prinl %fun%))

(defmeth foo pat (:match)
  (prinl %fun%))

(defun function (: (optarg %fun%))
  (prinl %fun%))

(defun function2 (: (optarg %fun%))
  (prinl optarg))

(defmacro mac ()
  (prinl %fun%)
  nil)

(with-objects ((f (new foo)))
  f.(foo)
  f.(pat)
  f.(bar))

(function)
(function2)

(mac)

(test %fun% nil)

(compile-only
  (eval-only
    (compile-file (base-name *load-path*) "temp.tlo")
    (remove-path "temp.tlo")))