File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -632,11 +632,14 @@ class Module {
632632 });
633633
634634 var exprs = [];
635+ exprs .push (macro var obj : Dynamic = cast obj );
636+ exprs .push (macro if ( obj .__value != null ) return obj .__value );
637+
635638 for ( col in s .columns ) {
636639 if ( col .kind == Hidden ) continue ;
637640 var colName = col .name ;
638641 var caseName = makeTypeName (col .name );
639- exprs .push (macro if ( v .$colName != null ) return $i {caseName }(cast v .$colName ));
642+ exprs .push (macro if ( obj .$colName != null ) return obj . __value = $i {caseName }(cast obj .$colName ));
640643 }
641644 exprs .push (macro throw " No polymorph value set" );
642645 types .push ({
@@ -652,7 +655,7 @@ class Module {
652655 kind : FFun ( {
653656 ret : tname .toComplex (),
654657 expr : macro return $b {exprs },
655- args : [{ name : " v " , type : def .toComplex (), opt :false }],
658+ args : [{ name : " obj " , type : def .toComplex (), opt :false }],
656659 }),
657660 }
658661 ]
You can’t perform that action at this time.
0 commit comments