Index: trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java	(revision 9344)
+++ trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java	(revision 9349)
@@ -2,4 +2,5 @@
 package org.openstreetmap.josm.actions.search;
 
+import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertThat;
@@ -379,3 +380,13 @@
         anonymous.match(anonymous.n2, true);
     }
+
+    @Test
+    public void testFooTypeBar() throws Exception {
+        try {
+            SearchCompiler.compile("foo type bar");
+            throw new RuntimeException();
+        } catch (ParseError parseError) {
+            assertEquals("<html>Expecting <code>:</code> after <i>type<i>", parseError.getMessage());
+        }
+    }
 }
