Skip to content

Commit

Permalink
Handle both typedef and abstract Null<T>
Browse files Browse the repository at this point in the history
Haxe 4 has switched to an abstract Null<T> [see: HaxeFoundation/haxe#6380].
  • Loading branch information
jonasmalacofilho committed Aug 23, 2017
1 parent 8fd679f commit 10d7767
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sys/db/RecordMacros.hx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class RecordMacros {
return c;
csup = csup.t.get().superClass;
}
case TType(t, p):
case TType(t, p) | TAbstract(t, p):
var name = t.toString();
if( p.length == 1 && (name == "Null" || name == "sys.db.SNull") ) {
isNull = true;
Expand Down Expand Up @@ -211,6 +211,7 @@ class RecordMacros {
case "Int": DInt;
case "Float": DFloat;
case "Bool": DBool;
case "Null": isNull = true; return makeType(p[0]);
case _ if (!a.get().meta.has(':coreType')):
var a = a.get();
#if macro
Expand Down

0 comments on commit 10d7767

Please sign in to comment.