-
-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors when creating some types withouth dot #60
Comments
|
|
I checked |
Fixed
Not investigated but plain weird.
Fixed but |
With the lates commit (don't know about previous) I have some more errors: (defn not-future []
(MapEntry "key" "value"))
(defn init [] ;; call this from main
(.value (MapEntry "key" "value")) ;; no error
(.-value (not-future))) ;; error if remove dash |
logs══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════ The following NoSuchMethodError was thrown building Builder(dirty): Class 'String' has no instance method 'call'. Receiver: "value" Tried calling: call()The relevant error-causing widget was: When the exception was thrown, this was the stack: ════════════════════════════════════════════════════════════════════════════════════════════════════ |
And another example, where I can't skip using dash is this issue #61: |
I have reproduced this with another code: (defn- ^:async handle-method [url params get-resp-fn]
(let [uri (.parse Uri (if params (str url "?" (params->query-string params)) url))
response (await (get-resp-fn uri))
data (response->map response)]
(if (= (.-statusCode response) 200) ;; this started wining after I wrap it with the function `handle-method`
[data nil]
[nil data])))
(defn ^:async post [url body & [params headers]]
(handle-method url params
#(http/post %1
:body (some-> body stringify-keys convert.json/encode)
:headers (when headers ^#/(Map String String) headers)))) Restarted application in 1,069ms.
E/flutter (30943): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: NoSuchMethodError: Class 'int' has n
o instance method 'call'.
E/flutter (30943): Receiver: 200
E/flutter (30943): Tried calling: call()
E/flutter (30943): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:38:5)
E/flutter (30943): #1 handle_method (package:lconvex/cljd-out/lconvex/http.dart:174:48)
E/flutter (30943): <asynchronous suspension>
E/flutter (30943): #2 init_async (package:lconvex/cljd-out/lconvex/sdk.dart:26:10)
E/flutter (30943): <asynchronous suspension>
E/flutter (30943): #3 main (package:lconvex/cljd-out/lconvex/main.dart:22:2)
E/flutter (30943): <asynchronous suspension>
E/flutter (30943): |
You must get “stern warnings” from the compiler. Add a type hint so that the compiler can determine the type of the object. |
Yes, this works with hint, thanks. |
should I close this issue @cgrand & @Liverm0r ? |
Can't crate custom objects (from detype).
Can't crate
m/Duration
object.Can't set values without dash.
The text was updated successfully, but these errors were encountered: