diff options
author | Eduardo Julian | 2015-12-31 17:19:03 -0400 |
---|---|---|
committer | Eduardo Julian | 2015-12-31 17:19:03 -0400 |
commit | 8aebde76ee407b96db956e5d8bdea8e67dc6c6ad (patch) | |
tree | 8a3a5722f32b056960001715d5ed1a41f6983770 /src/lux/analyser/host.clj | |
parent | 51fc12ae976f2106f549b4a8f07377c9185ebb68 (diff) |
- [Refactor] Removed the (now unnecessary) lux.type.host/class-name->type function.
- When compiling definitions, their names now carry a hash code to avoid file-name collisions when generating files in case-insensitive file-systems.
Diffstat (limited to 'src/lux/analyser/host.clj')
-rw-r--r-- | src/lux/analyser/host.clj | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lux/analyser/host.clj b/src/lux/analyser/host.clj index fb4c3e55d..cf503f188 100644 --- a/src/lux/analyser/host.clj +++ b/src/lux/analyser/host.clj @@ -297,8 +297,7 @@ =object (&&/analyse-1+ analyse object) [sub-class sub-params] (ensure-object (&&/expr-type* =object)) (&/$DataT super-class* super-params*) (&host-type/->super-type &type/existential class-loader class sub-class sub-params) - :let [;; _ (prn '<name> sub-class '-> super-class* (&/|length parent-gvars) (&/|length super-params*)) - gtype-env (&/fold2 (fn [m ^TypeVariable g t] (&/Cons$ (&/T (.getName g) t) m)) + :let [gtype-env (&/fold2 (fn [m ^TypeVariable g t] (&/Cons$ (&/T (.getName g) t) m)) (&/|table) parent-gvars super-params*)] @@ -317,11 +316,12 @@ (|do [class-loader &/loader [gret exceptions parent-gvars gvars gargs] (&host/lookup-static-method class-loader class method classes) _ (ensure-catching exceptions) - =args (&/map2% (fn [_class _arg] - (&&/analyse-1 analyse (&host-type/class-name->type _class) _arg)) - classes - args) - output-type (&host-type/instance-param &type/existential (&/|table) gret) + gtype-env (&/fold% (fn [m ^TypeVariable g] + (|do [=var-type &type/existential] + (return (&/Cons$ (&/T (.getName g) =var-type) m)))) + (&/|table) + parent-gvars) + [output-type =args] (analyse-method-call-helper analyse gret gtype-env gvars gargs args) _ (&type/check exo-type (as-otype+ output-type)) _cursor &/cursor] (return (&/|list (&&/|meta exo-type _cursor |