We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b22008f commit 3b0bef9Copy full SHA for 3b0bef9
hscript/Checker.hx
@@ -934,6 +934,17 @@ class Checker {
934
}
935
936
937
+ public function followOnce( t : TType, withAbstracts=false ) {
938
+ return switch( t ) {
939
+ case TMono(r): if( r.r != null ) r.r else t;
940
+ case TType(t,args): apply(t.t, t.params, args);
941
+ case TLazy(f): f();
942
+ case TNull(t) if( withAbstracts ): t;
943
+ case TAbstract(a, args) if( withAbstracts ): apply(a.t,a.params,args);
944
+ default: t;
945
+ }
946
947
+
948
public function getFields( t : TType ) : Array<{ name : String, t : TType }> {
949
var fields = [];
950
switch( follow(t) ) {
0 commit comments