diff options
author | Eduardo Julian | 2017-10-19 00:22:47 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-10-19 00:22:47 -0400 |
commit | 6c24a9830cfbf32fbbb6fbfd6f2b7354cb994605 (patch) | |
tree | 3a374d8b90aec63c46fda35917048e702f1fde84 /new-luxc/source/luxc/analyser/procedure/host.jvm.lux | |
parent | 7c521f1e042a723be225457fa2b5e42f3a681ada (diff) |
- Compilation for method invocation.
Diffstat (limited to 'new-luxc/source/luxc/analyser/procedure/host.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/analyser/procedure/host.jvm.lux | 13 |
1 files changed, 9 insertions, 4 deletions
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<Meta> [#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 "'."))))) |