You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sema: Fix type member lookup if generic signature validation fails
When validateGenericFuncSignature() returns true, finalizeGenericParamList()
is never called. Name lookup, via PartialGenericTypeToArchetypeResolver would
return a dependent member type of the generic type parameter type, not an
archetype as expected in this case. This would later on lead to a crash in
ReplaceDependentTypes if the function body contained a reference to such a
member type.
Fix this by marking the GenericTypeParamDecls as invalid in this case, and
returning an ErrorType from PartialGenericTypeToArchetypeResolver if given
an invalid GenericTypeParamDecl.
While we're at it, there was an unused isInvalid local variable in
TypeCheckDecl::visitFuncDecl(). It was written to but never read. Replace
the writes with calls to setInvalid().
Fixes <rdar://problem/19620340>.
Swift SVN r30632
Copy file name to clipboardExpand all lines: validation-test/compiler_crashers_fixed/0756-llvm-ondiskchainedhashtable-swift-modulefile-decltableinfo-find.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
// RUN: not --crash %target-swift-frontend %s -parse
1
+
// RUN: not %target-swift-frontend %s -parse
2
2
3
3
// Distributed under the terms of the MIT license
4
4
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
Copy file name to clipboardExpand all lines: validation-test/compiler_crashers_fixed/0781-swift-constraints-constraintsystem-diagnosefailurefromconstraints.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
// RUN: not --crash %target-swift-frontend %s -parse
1
+
// RUN: not %target-swift-frontend %s -parse
2
2
3
3
// Distributed under the terms of the MIT license
4
4
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
0 commit comments