Skip to content

Commit 575040b

Browse files
back2dosncannasse
authored andcommitted
Fix Haxe 3. (#75)
1 parent 206959a commit 575040b

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

hscript/Macro.hx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,12 @@ class Macro {
128128
case CTParent(t): TParent(convertType(t));
129129
case CTFun(args, ret):
130130
TFunction(map(args,convertType), convertType(ret));
131-
#if (haxe_ver >= 4)
132-
case CTNamed(name, ct):
133-
TNamed(name, convertType(ct));
134-
#end
131+
case CTNamed(name, convertType(_) => ct):
132+
#if (haxe_ver >= 4)
133+
TNamed(name, ct);
134+
#else
135+
ct;
136+
#end
135137
case CTAnon(fields):
136138
var tf = [];
137139
for( f in fields ) {

hscript/Printer.hx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ class Printer {
6262
}
6363
add(">");
6464
}
65-
#if (haxe_ver >= 4)
6665
case CTNamed(name, t):
6766
add(name);
6867
add(':');
@@ -76,7 +75,6 @@ class Printer {
7675
}
7776
add(')->');
7877
type(ret);
79-
#end
8078
case CTFun(args, ret):
8179
if( args.length == 0 )
8280
add("Void -> ");

0 commit comments

Comments
 (0)