   expectEqual(0, m.descendant(1, 1, "bite") as? Int)
   expectEmpty(m.descendant(1, 1, "bork"))
 }
+
+mirrors.test("Invalid Path Type") {
+  struct X : MirrorPathType {}
+  let m = reflect([1, 2, 3])
+  expectEqual(1, m.descendant(0) as? Int)
+  expectCrashLater()
+  m.descendant(X())
+}
+
 runAllTests()

    for e in [first] + rest {
      let structure = reflect(result).structure
      let position: Structure.Index
      switch MirrorPathElement(e) {
      case .Offset(let n):
        position = advance(structure.startIndex, n, structure.endIndex)
      case .Label(let l):
        position = find(structure) { $0.label == l } ?? structure.endIndex
      }
      if position == structure.endIndex { return nil }
      result = structure[position].value

extension IntMax : MirrorPathType {}
extension Int : MirrorPathType {}
extension String : MirrorPathType {}

/// Returns the first index `i` in `indices(domain)` such that
/// `predicate(domain[i])` is `true``, or `nil` if
