Skip to content

Remove an extra space in the requires_no_same_type_archetype warning #14233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/swift/AST/DiagnosticsSema.def
Original file line number Diff line number Diff line change
Expand Up @@ -1698,7 +1698,7 @@ ERROR(requires_not_suitable_archetype,none,
(TypeLoc))
WARNING(requires_no_same_type_archetype,none,
"neither type in same-type constraint (%0 or %1) refers to a "
"generic parameter or associated type",
"generic parameter or associated type",
(Type, Type))

ERROR(requires_generic_params_made_equal,none,
Expand Down
2 changes: 1 addition & 1 deletion test/Generics/same_type_constraints.swift
Original file line number Diff line number Diff line change
Expand Up @@ -376,5 +376,5 @@ func resultTypeSuppress<T: P1>() -> StructTakingP1<T> {
typealias NotAnInt = Double

extension X11 where NotAnInt == Int { }
// expected-warning@-1{{neither type in same-type constraint ('NotAnInt' (aka 'Double') or 'Int') refers to a generic parameter or associated type}}
// expected-warning@-1{{neither type in same-type constraint ('NotAnInt' (aka 'Double') or 'Int') refers to a generic parameter or associated type}}
// expected-error@-2{{generic signature requires types 'NotAnInt' (aka 'Double') and 'Int' to be the same}}
4 changes: 2 additions & 2 deletions test/decl/typealias/protocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ extension P10 {
typealias U = Float
}

extension P10 where T == Int { } // expected-warning{{neither type in same-type constraint ('P10.T' (aka 'Int') or 'Int') refers to a generic parameter or associated type}}
extension P10 where T == Int { } // expected-warning{{neither type in same-type constraint ('P10.T' (aka 'Int') or 'Int') refers to a generic parameter or associated type}}

extension P10 where A == X<T> { }

Expand All @@ -277,7 +277,7 @@ extension P10 where A == X<U> { } // expected-error{{use of undeclared type 'U'}
extension P10 where A == X<Self.U> { }

extension P10 where V == Int { } // expected-warning 3{{'V' is deprecated: just use Int, silly}}
// expected-warning@-1{{neither type in same-type constraint ('P10.V' (aka 'Int') or 'Int') refers to a generic parameter or associated type}}
// expected-warning@-1{{neither type in same-type constraint ('P10.V' (aka 'Int') or 'Int') refers to a generic parameter or associated type}}

// rdar://problem/36003312
protocol P11 {
Expand Down