File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,8 @@ function generate_model_expression(backend, model_specification)
221221 ms_args_const_ids = Vector {Tuple{Symbol, Symbol}} ()
222222
223223 ms_arg_expression_converter = (ms_arg) -> begin
224+ arg = nothing
225+ smth = nothing
224226 if @capture (ms_arg, arg_:: ConstVariable = smth_) || @capture (ms_arg, arg_:: ConstVariable )
225227 # rc_arg = gensym(:constvar)
226228 push! (ms_args_const_ids, (arg, arg)) # backward compatibility for old behaviour with gensym
@@ -235,6 +237,11 @@ function generate_model_expression(backend, model_specification)
235237 push! (ms_args_guard_ids, arg)
236238 push! (ms_args_ids, arg)
237239 return argument_write_default_value (arg, smth)
240+ elseif @capture (ms_arg, :: T_ = smth_) || @capture (ms_arg, :: T_ )
241+ arg = gensym (:ms_arg )
242+ push! (ms_args_guard_ids, arg)
243+ push! (ms_args_ids, arg)
244+ return argument_write_default_value (:($ (arg):: $ (T)), smth)
238245 else
239246 error (" Invalid argument specification: $(ms_arg) " )
240247 end
You can’t perform that action at this time.
0 commit comments