Skip to content

Commit 70ec679

Browse files
authored
Merge pull request #4040 from rudkx/fix-27671033
2 parents 92d19ae + 107d602 commit 70ec679

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/decl/var/properties.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,6 +1133,13 @@ extension rdar17391625derived {
11331133
}
11341134
}
11351135

1136+
// <rdar://problem/27671033> Crash when defining property inside an invalid extension
1137+
public protocol rdar27671033P {}
1138+
struct rdar27671033S<Key, Value> {}
1139+
extension rdar27671033S : rdar27671033P where Key == String { // expected-error {{extension of type 'rdar27671033S' with constraints cannot have an inheritance clause}}
1140+
// expected-error@-1 {{same-type requirement makes generic parameter 'Key' non-generic}}
1141+
let d = rdar27671033S<Int, Int>() // expected-error {{extensions may not contain stored properties}}
1142+
}
11361143

11371144
// <rdar://problem/19874152> struct memberwise initializer violates new sanctity of previously set `let` property
11381145
struct r19874152S1 {

0 commit comments

Comments
 (0)