Merge pull request #10582 from DougGregor/gsb-subst-crasher

diff --git a/lib/AST/GenericSignatureBuilder.cpp b/lib/AST/GenericSignatureBuilder.cpp
index c5de0c5..749f761 100644
--- a/lib/AST/GenericSignatureBuilder.cpp
+++ b/lib/AST/GenericSignatureBuilder.cpp
@@ -3708,7 +3708,7 @@
                                              ModuleDecl *inferForModule) {
   auto subst = [&](Type t) {
     if (subMap)
-      return t.subst(*subMap);
+      return t.subst(*subMap, SubstFlags::UseErrorType);
 
     return t;
   };
diff --git a/validation-test/compiler_crashers/28802-constrainttype-missing-constraint-type.swift b/validation-test/compiler_crashers_fixed/28802-constrainttype-missing-constraint-type.swift
similarity index 88%
rename from validation-test/compiler_crashers/28802-constrainttype-missing-constraint-type.swift
rename to validation-test/compiler_crashers_fixed/28802-constrainttype-missing-constraint-type.swift
index b1d94f9..df54499 100644
--- a/validation-test/compiler_crashers/28802-constrainttype-missing-constraint-type.swift
+++ b/validation-test/compiler_crashers_fixed/28802-constrainttype-missing-constraint-type.swift
@@ -6,5 +6,5 @@
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 
 // REQUIRES: asserts
-// RUN: not --crash %target-swift-frontend %s -emit-ir
+// RUN: not %target-swift-frontend %s -emit-ir
 class a<a{protocol A{protocol A{}typealias e where f:A
diff --git a/validation-test/compiler_crashers/28804-second.swift b/validation-test/compiler_crashers_fixed/28804-second.swift
similarity index 88%
rename from validation-test/compiler_crashers/28804-second.swift
rename to validation-test/compiler_crashers_fixed/28804-second.swift
index 43803bc..edcddea 100644
--- a/validation-test/compiler_crashers/28804-second.swift
+++ b/validation-test/compiler_crashers_fixed/28804-second.swift
@@ -6,7 +6,7 @@
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 
 // REQUIRES: asserts
-// RUN: not --crash %target-swift-frontend %s -emit-ir
+// RUN: not %target-swift-frontend %s -emit-ir
 class a<a{
 protocol A{{}typealias e where f=A
 protocol A