From 91f651d90b48e245855e06188036db69931faf15 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Sun, 24 Dec 2023 02:35:43 -0500 Subject: [PATCH] Throw an error if p is supplied as kwarg --- Project.toml | 2 +- src/problems/basic_problems.jl | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 59431e9db..22d437e83 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "SciMLBase" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" authors = ["Chris Rackauckas and contributors"] -version = "2.11.5" +version = "2.11.6" [deps] ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" diff --git a/src/problems/basic_problems.jl b/src/problems/basic_problems.jl index 2aba5bda8..727d4b605 100644 --- a/src/problems/basic_problems.jl +++ b/src/problems/basic_problems.jl @@ -244,6 +244,9 @@ struct NonlinearProblem{uType, isinplace, P, F, K, PT} <: p = NullParameters(), problem_type = StandardNonlinearProblem(); kwargs...) where {iip} + if haskey(kwargs, :p) + error("`p` specified as a keyword argument `p = $(kwargs[:p])` to `NonlinearProblem`. This is not supported.") + end warn_paramtype(p) new{typeof(u0), iip, typeof(p), typeof(f), typeof(kwargs), typeof(problem_type)}(f,