Skip to content

Commit

Permalink
Merge pull request #215 from gama-platform/fixes-214
Browse files Browse the repository at this point in the history
fixes #214
  • Loading branch information
lesquoyb authored Jun 18, 2024
2 parents 238fa9a + b69ec89 commit 1d50ac6
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import gama.gaml.descriptions.IDescription;
import gama.gaml.expressions.IExpression;
import gama.gaml.operators.Cast;
import gama.gaml.operators.Random;
import gama.gaml.types.GamaDateType;
import gama.gaml.types.GamaFloatType;
import gama.gaml.types.GamaPointType;
Expand Down Expand Up @@ -311,8 +310,10 @@ public Object value() {
private List<ParametersSet> buildParameterFromMap(final IScope scope, final List<ParametersSet> sets,
final int index) {
IExpression psexp = getFacet(IKeyword.WITH);
if (psexp.getDenotedType() != Types.LIST) throw GamaRuntimeException.error(
"You cannot use " + IKeyword.WITH + " facet without input a list of maps as parameters inputs", scope);
if ( !Types.LIST.isAssignableFrom(psexp.getDenotedType())) {
GAMA.reportAndThrowIfNeeded(scope, GamaRuntimeException.error(
"The facet '" + IKeyword.WITH + "' must be provided with a list of maps", scope), true);
}
List<Map<String, Object>> parameterSets = Cast.asList(scope, psexp.value(scope));

for (Map<String, Object> parameterSet : parameterSets) {
Expand Down

0 comments on commit 1d50ac6

Please sign in to comment.