src/Pure/General/path.scala
changeset 48658 4c7932270d6d
parent 48548 49afe0e92163
child 52106 090a519982e9
--- a/src/Pure/General/path.scala	Fri Aug 03 12:37:31 2012 +0200
+++ b/src/Pure/General/path.scala	Fri Aug 03 13:06:25 2012 +0200
@@ -167,7 +167,10 @@
     def eval(elem: Path.Elem): List[Path.Elem] =
       elem match {
         case Path.Variable(s) =>
-          Path.explode(Isabelle_System.getenv_strict(s)).elems
+          val path = Path.explode(Isabelle_System.getenv_strict(s))
+          if (path.elems.exists(_.isInstanceOf[Path.Variable]))
+            error ("Illegal path variable nesting: " + s + "=" + path.toString)
+          else path.elems
         case x => List(x)
       }