Skip to content

Haxe Language Support #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 21 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Need args to resolve overloads..
  • Loading branch information
piboistudios committed Oct 1, 2021
commit afa3471ba91e32e16743dfdc52ed2f18b9df6384
10 changes: 5 additions & 5 deletions hscript/Checker.hx
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ class Checker {
if( isCompletion ) throw new Completion(expr, t);
}

function typeField( o : Expr, f : String, expr : Expr, forWrite : Bool ) {
function typeField( o : Expr, f : String, expr : Expr, forWrite : Bool, ?args:Array<Expr>) {
var ot = typeExpr(o, Value);
if( f == null )
onCompletion(expr, ot);
Expand All @@ -900,7 +900,7 @@ class Checker {
return ft;
}

function typeExpr( expr : Expr, withType : WithType ) : TType {
function typeExpr( expr : Expr, withType : WithType, ?args:Array<Expr>) : TType {
if( expr == null && isCompletion )
return switch( withType ) {
case WithType(t): t;
Expand Down Expand Up @@ -958,7 +958,7 @@ class Checker {
case EParent(e):
return typeExpr(e,withType);
case ECall(e, params):
var ft = typeExpr(e, Value);
var ft = typeExpr(e, Value, params);
switch( follow(ft) ) {
case TFun(args, ret):
for( i in 0...params.length ) {
Expand All @@ -983,8 +983,8 @@ class Checker {
}
case EField(o, f):
var typeName = new Printer().exprToString(o);
if(globals.exists(typeName)) return typeField(EIdent(typeName).mk(expr),f, expr, false);
else return typeField(o,f,expr,false);
if(globals.exists(typeName)) return typeField(EIdent(typeName).mk(expr),f, expr, false, args);
else return typeField(o,f,expr,false, args);
case ECheckType(v, t):
var ct = makeType(t, expr);
var vt = typeExpr(v, WithType(ct));
Expand Down