From 6c24a9830cfbf32fbbb6fbfd6f2b7354cb994605 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 19 Oct 2017 00:22:47 -0400 Subject: - Compilation for method invocation. --- new-luxc/source/luxc/analyser/procedure/host.jvm.lux | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'new-luxc/source/luxc/analyser') diff --git a/new-luxc/source/luxc/analyser/procedure/host.jvm.lux b/new-luxc/source/luxc/analyser/procedure/host.jvm.lux index d4029b15b..63931c6f2 100644 --- a/new-luxc/source/luxc/analyser/procedure/host.jvm.lux +++ b/new-luxc/source/luxc/analyser/procedure/host.jvm.lux @@ -1128,10 +1128,16 @@ (do meta;Monad [#let [argsT (list/map product;left argsTC)] [methodT exceptionsT] (methods class method #Virtual argsT) - [outputT argsA] (&inference;apply-function (sub-type-analyser analyse) methodT (list& objectC (list/map product;right argsTC))) + [outputT allA] (&inference;apply-function (sub-type-analyser analyse) methodT (list& objectC (list/map product;right argsTC))) + #let [[objectA argsA] (case allA + (#;Cons objectA argsA) + [objectA argsA] + + _ + (undefined))] [unboxed castT] (infer-out outputT)] (wrap (#la;Procedure proc (list& (#la;Text class) (#la;Text method) - (#la;Text unboxed) (decorate-inputs argsT argsA))))) + (#la;Text unboxed) objectA (decorate-inputs argsT argsA))))) _ (&;fail (format "Wrong syntax for '" proc "'."))))) @@ -1186,8 +1192,7 @@ [methodT exceptionsT] (constructor-methods class argsT) [outputT argsA] (&inference;apply-function (sub-type-analyser analyse) methodT (list/map product;right argsTC)) [unboxed castT] (infer-out outputT)] - (wrap (#la;Procedure proc (list& (#la;Text class) - (#la;Text unboxed) (decorate-inputs argsT argsA))))) + (wrap (#la;Procedure proc (list& (#la;Text class) (decorate-inputs argsT argsA))))) _ (&;fail (format "Wrong syntax for '" proc "'."))))) -- cgit v1.2.3