diff --git a/src/org/rascalmpl/semantics/dynamic/Expression.java b/src/org/rascalmpl/semantics/dynamic/Expression.java index 4450b2dc0c4..f2c77c83550 100644 --- a/src/org/rascalmpl/semantics/dynamic/Expression.java +++ b/src/org/rascalmpl/semantics/dynamic/Expression.java @@ -79,6 +79,7 @@ import org.rascalmpl.interpreter.staticErrors.UninitializedPatternMatch; import org.rascalmpl.interpreter.staticErrors.UninitializedVariable; import org.rascalmpl.interpreter.staticErrors.UnsupportedOperation; +import org.rascalmpl.interpreter.staticErrors.UnsupportedPattern; import org.rascalmpl.interpreter.types.FunctionType; import org.rascalmpl.interpreter.types.NonTerminalType; import org.rascalmpl.interpreter.types.OverloadedFunctionType; @@ -2851,7 +2852,12 @@ public VariableBecomes(ISourceLocation __param1, IConstructor tree, Name __param @Override public IMatchingResult buildMatcher(IEvaluatorContext eval) { - IMatchingResult pat = this.getPattern().buildMatcher(eval); + org.rascalmpl.ast.Expression pattern = this.getPattern(); + + if (pattern instanceof Splice) { + throw new UnsupportedPattern("named splices (i.e. name:*pattern)", this); + } + IMatchingResult pat = pattern.buildMatcher(eval); LinkedList names = new LinkedList(); names.add(this.getName()); IMatchingResult var = new QualifiedNamePattern(eval, this, ASTBuilder. make("QualifiedName", "Default", this.getLocation(), names));