diff options
author | Eduardo Julian | 2015-10-07 01:04:55 -0400 |
---|---|---|
committer | Eduardo Julian | 2015-10-07 01:04:55 -0400 |
commit | bce3a19e53036d760820e9f217d0243f17e4be51 (patch) | |
tree | 13db2a2fd660ebb150f03e671aae9bc1b0d39937 /src/lux/type/host.clj | |
parent | d0800f9fa043cce9e0bba299059cc6a8944c85f7 (diff) |
- The method-invocation analysers now take into consideration whether they must work for classes or interfaces & perform the appropriate checks.
- A default <init> method is added to the dummy class used during the analysis of anonymous classes.
- When adding the default invoke-special for anonymous classes, now using the one from the parent class, rather than the one from Object.
- The packaging for the uberjar is now a bit more specific regarding which elements to include or to exclude.
- Type errors when comparing JVM generic types are now a bit more specific.
Diffstat (limited to '')
-rw-r--r-- | src/lux/type/host.clj | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lux/type/host.clj b/src/lux/type/host.clj index d4627b273..38acf8162 100644 --- a/src/lux/type/host.clj +++ b/src/lux/type/host.clj @@ -197,10 +197,11 @@ :else (let [e!name (as-obj e!name) a!name (as-obj a!name)] - (cond (and (.equals ^Object e!name a!name) - (= (&/|length e!params) (&/|length a!params))) - (|do [_ (&/map2% check e!params a!params)] - (return (&/T fixpoints nil))) + (cond (.equals ^Object e!name a!name) + (if (= (&/|length e!params) (&/|length a!params)) + (|do [_ (&/map2% check e!params a!params)] + (return (&/T fixpoints nil))) + (fail (str "[Type Error] Amounts of generic parameters don't match: " e!name "(" (&/|length e!params) ")" " vs " a!name "(" (&/|length a!params) ")"))) (not invariant??) (|do [actual* (->super-type existential class-loader e!name a!name a!params)] |