From fd6ccbb59278498d2fb0857653d8b8135c380bfa Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Thu, 9 Jan 2025 11:56:51 +0100 Subject: [PATCH] fixed nasty bug in Type.intersection w.r.t. parameter types --- src/org/rascalmpl/types/NonTerminalType.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/org/rascalmpl/types/NonTerminalType.java b/src/org/rascalmpl/types/NonTerminalType.java index 20094a487ef..8ff2293f257 100644 --- a/src/org/rascalmpl/types/NonTerminalType.java +++ b/src/org/rascalmpl/types/NonTerminalType.java @@ -346,6 +346,9 @@ public boolean intersects(Type other) { if (other == RascalValueFactory.Tree) { return true; } + else if (other.isParameter()) { + return other.intersects(this); + } else if (other instanceof NonTerminalType) { return ((NonTerminalType) other).intersectsWithNonTerminal(this); }