     (goto-char (match-end 0))
     t))
 
-(defun scala-match-and-skip-type-args (limit)
-  (when (looking-at (concat "[[,]\\s *\\(" scala-ident-re "\\)?\\]?"))
-    (goto-char (match-end 0))
-    t))
+(defun scala-match-and-skip-type-param (limit)
+  (scala-when-looking-at "\\s *[[,]\\s *"
+    (let ((matches (scala-make-match '((scala-forward-type-param . t)))))
+      (scala-when-looking-at "\\s *\\]")
+      (set-match-data matches)
+      t)))
 
 (defun scala-match-and-skip-result-type (limit)
-  (when (looking-at "\\s *:\\s *")
-    (goto-char (match-end 0))
+  (scala-when-looking-at "\\s *:\\s *"
     (set-match-data (list (point-marker)
                           (progn (scala-forward-type) (point-marker))))
     t))

                                  (forward-char)
                                  (scala-forward-spaces)
                                  t)) . nil)
                             (scala-forward-type . t)))))
             (when (looking-at "\\s *,") (goto-char (match-end 0)))
             (set-match-data matches)
             t)))))

(defun scala-match-and-skip-ident (limit)
  (scala-forward-spaces)

    ("\\<extends\\|with\\>\\s *[^{]"
     (scala-match-and-skip-ident (goto-char (1- (match-end 0))) nil
                                 (0 font-lock-type-face nil))
     (scala-match-and-skip-type-param nil nil
                                      (1 font-lock-type-face nil t)))

    ;; patterns
    ("\\<\\(case\\|val\\)\\>\\s *"
