Skip to content
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

Jasper Helper throws exception on Int64 #260

Closed
drujensen opened this issue Sep 13, 2017 · 0 comments
Closed

Jasper Helper throws exception on Int64 #260

drujensen opened this issue Sep 13, 2017 · 0 comments

Comments

@drujensen
Copy link
Member

Description

instantiating 'text_field()'
in lib/jasper_helpers/src/jasper_helpers/forms.cr:4: instantiating 'JasperHelpers::Kit:Module#safe_hash(Hash(Symbol, String), NamedTuple(value: Int64 | Nil, placeholder: String, class: String))'

    options_hash = Kit.safe_hash({:name => name, :id => name}, options)
                       ^~~~~~~~~

in lib/jasper_helpers/src/jasper_helpers/kit.cr:26: instantiating 'merge(Tuple(Hash(Symbol, String), NamedTuple(value: Int64 | Nil, placeholder: String, class: String)))'

    sanitize(merge(*options))
             ^~~~~

in lib/jasper_helpers/src/jasper_helpers/kit.cr:10: instantiating 'Tuple(Hash(Symbol, String), NamedTuple(value: Int64 | Nil, placeholder: String, class: String))#reduce(Hash(Symbol, Bool | Float64 | Int32 | String | Symbol | Nil))'

    options.reduce(OptionHash.new) do |h, opts|
            ^~~~~~

in /usr/local/Cellar/crystal-lang/0.23.1_1/src/enumerable.cr:606: instantiating 'each()'

    each do |elem|
    ^~~~

in lib/jasper_helpers/src/jasper_helpers/kit.cr:11: instantiating 'Hash(Symbol, Bool | Float64 | Int32 | String | Symbol | Nil)#merge!((Hash(Symbol, Int64 | String | Nil) | Hash(Symbol, String)))'

      h.merge!(opts.to_h)
        ^~~~~~

in /usr/local/Cellar/crystal-lang/0.23.1_1/src/hash.cr:460: instantiating '(Hash(Symbol, Int64 | String | Nil) | Hash(Symbol, String))#each()'

    other.each do |k, v|
          ^~~~

in /usr/local/Cellar/crystal-lang/0.23.1_1/src/hash.cr:460: instantiating '(Hash(Symbol, Int64 | String | Nil) | Hash(Symbol, String))#each()'

    other.each do |k, v|
          ^~~~

in /usr/local/Cellar/crystal-lang/0.23.1_1/src/hash.cr:461: no overload matches 'Hash(Symbol, Bool | Float64 | Int32 | String | Symbol | Nil)#[]=' with types Symbol, (Int64 | String | Nil)
Overloads are:
 - Hash(K, V)#[]=(key : K, value : V)
Couldn't find overloads for these types:
 - Hash(Symbol, Bool | Float64 | Int32 | String | Symbol | Nil)#[]=(key : Symbol, value : Int64)

      self[k] = v
          ^

🤖  Compile time errors detected. SentryBot shutting down...

Steps to Reproduce

  1. amber new blog -d mysql --deps
  2. cd blog
  3. amber g scaffold post user_id:int64 title:string body:text published:bool
  4. amber w

Expected behavior: [What you expect to happen]

Application will compile

Actual behavior: [What actually happens]

Application fails to compile with error above

Reproduces how often: [What percentage of the time does it reproduce?]

100%

Versions

$amber -v
Amber CMD (ambercr.io) - v0.2.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

1 participant