diff options
author | Eduardo Julian | 2016-07-23 23:32:20 -0400 |
---|---|---|
committer | Eduardo Julian | 2016-07-23 23:32:20 -0400 |
commit | 9b452b13a50f75b4ab5fb28aa6febddbdb2e6680 (patch) | |
tree | 5515bdf3fcba9e2a2886b0ac4065a2577630c915 /src | |
parent | da4968b5873fcebdf91e1bae58674ff3d5346e0d (diff) |
- Fixed a bug in which the signatures for multi-parameter generic classes where getting spaces between the parameter signatures, which is invalid.
- Type-errors now include cursor information.
Diffstat (limited to 'src')
-rw-r--r-- | src/lux/host/generics.clj | 2 | ||||
-rw-r--r-- | src/lux/type.clj | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lux/host/generics.clj b/src/lux/host/generics.clj index 433b79d1c..0f4339d61 100644 --- a/src/lux/host/generics.clj +++ b/src/lux/host/generics.clj @@ -97,7 +97,7 @@ name (let [params* (if (&/|empty? params) "" - (str "<" (->> params (&/|map gclass->signature) (&/|interpose " ") (&/fold str "")) ">"))] + (str "<" (->> params (&/|map gclass->signature) (&/|interpose "") (&/fold str "")) ">"))] (str "L" (->bytecode-class-name name) params* ";")))) (&/$GenericArray param) diff --git a/src/lux/type.clj b/src/lux/type.clj index 2729b92e8..898088ff8 100644 --- a/src/lux/type.clj +++ b/src/lux/type.clj @@ -541,11 +541,11 @@ (defn ^:private check-error [err expected actual] (|do [=expected (show-type+ expected) =actual (show-type+ actual)] - (fail (str (if (= "" err) err (str err "\n")) - "[Type Checker]\n" - "Expected: " =expected "\n\n" - "Actual: " =actual - "\n")))) + (&/fail-with-loc (str (if (= "" err) err (str err "\n")) + "[Type Checker]\n" + "Expected: " =expected "\n\n" + "Actual: " =actual + "\n")))) (defn beta-reduce [env type] (|case type |