summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2012-06-14 15:00:13 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2012-06-14 19:31:39 -0400
commit61127375f70c2f87576fbb6dcf7edc46c794d158 (patch)
tree8a47b6ba23d7b2fc1cbfd4f126169501bd66445c
parent797b22036e745df93aa73a78e2a0ed6698836b47 (diff)
Make defs.nl compile
-rw-r--r--examples/defs.nl17
1 files changed, 10 insertions, 7 deletions
diff --git a/examples/defs.nl b/examples/defs.nl
index 456def2..0720220 100644
--- a/examples/defs.nl
+++ b/examples/defs.nl
@@ -1,12 +1,16 @@
/* */
typedef blah = Froot;
-typedef asdfasdf = fn (int32) -> int32;
+typedef asdfasdf = fn (t: int32) -> int32;
typedef callback = asdfasdf;
class Button
{
- typedef ClickFunction = fn (Button) -> bool;
+ typedef ClickFunction = fn (b: Button) -> bool;
+
+ new Blah (x: int32)
+ {
+ }
f: ClickFunction;
@@ -47,10 +51,9 @@ p.bar = z.method;
b: Button = new Button ();
-b.set_on_click (fn (x: Button) -> bool
-{
- print 1234;
- return false;
-});
+b.set_on_click (fn (x: Button) -> bool {
+ print 1234;
+ return false;
+ });
print p.bar (50);