Skip to content

Commit 1050519

Browse files
committed
The Requirement Machine explicitly rejects the generic signature in protocol-conformance-rdar39805133.swift
1 parent e2c6fe8 commit 1050519

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/multifile/protocol-conformance-rdar39805133.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %target-swift-frontend -emit-ir -o - -primary-file %s %S/Inputs/protocol-conformance-rdar39805133-other.swift -module-name foo
2-
// RUN: %target-swift-frontend -emit-ir -o - %s -primary-file %S/Inputs/protocol-conformance-rdar39805133-other.swift -module-name foo
1+
// RUN: %target-swift-frontend -verify -emit-ir -o - -primary-file %s %S/Inputs/protocol-conformance-rdar39805133-other.swift -module-name foo -requirement-machine-protocol-signatures=on -requirement-machine-inferred-signatures=on
2+
// RUN: %target-swift-frontend -emit-ir -o - %s -primary-file %S/Inputs/protocol-conformance-rdar39805133-other.swift -module-name foo -requirement-machine-protocol-signatures=on -requirement-machine-inferred-signatures=on
33

44
protocol _Int : DefaultInit {
55
associatedtype Minus1 : _Int
@@ -27,3 +27,5 @@ protocol AtLeast0 : _Int {}
2727
extension _0_ : AtLeast0 {}
2828
protocol AtLeast1 : AtLeast0 {}
2929
extension Inc : AtLeast1, AtLeast0 where T == _0_ {}
30+
// expected-error@-1 {{cannot build rewrite system for generic signature; rule length limit exceeded}}
31+
// expected-note@-2 {{failed rewrite rule is τ_0_0.[_Int:Plus1].[_Int:Plus1].[_Int:Plus1].[_Int:Plus1].[_Int:Plus1].[_Int:Plus1].[_Int:Plus1].[_Int:Plus1].[_Int:Plus1].[_Int:Plus1].[_Int:Plus1].[concrete: Inc<Inc<Inc<Inc<Inc<Inc<Inc<Inc<Inc<Inc<Inc<_0_>>>>>>>>>>>] => τ_0_0.[_Int:Plus1].[_Int:Plus1].[_Int:Plus1].[_Int:Plus1].[_Int:Plus1].[_Int:Plus1].[_Int:Plus1].[_Int:Plus1].[_Int:Plus1].[_Int:Plus1].[_Int:Plus1]}}

0 commit comments

Comments
 (0)