Skip to content

[AST/Printing] Don't omit empty labels in special names #19525

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
Sep 25, 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 lib/AST/Identifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ llvm::raw_ostream &DeclName::print(llvm::raw_ostream &os,
}

llvm::raw_ostream &DeclName::printPretty(llvm::raw_ostream &os) const {
return print(os, /*skipEmptyArgumentNames=*/true);
return print(os, /*skipEmptyArgumentNames=*/!isSpecial());
}

ObjCSelector::ObjCSelector(ASTContext &ctx, unsigned numArgs,
Expand Down
32 changes: 16 additions & 16 deletions test/ClangImporter/availability.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,19 @@ func test_unavailable_accessors(_ obj: UnavailableAccessors,
UnavailableAccessors.setterUnavailableClass = 0 // expected-error {{setter for 'setterUnavailableClass' is unavailable}}
UnavailableAccessors.setterUnavailableClass += 1 // expected-error {{setter for 'setterUnavailableClass' is unavailable}}

_ = sub[0] // expected-error {{getter for 'subscript' is unavailable: bad subscript getter}}
sub[0] = "" // expected-error {{setter for 'subscript' is unavailable: bad subscript setter}}
sub[0] += "" // expected-error {{getter for 'subscript' is unavailable: bad subscript getter}} expected-error {{setter for 'subscript' is unavailable: bad subscript setter}}
_ = sub[0] // expected-error {{getter for 'subscript(_:)' is unavailable: bad subscript getter}}
sub[0] = "" // expected-error {{setter for 'subscript(_:)' is unavailable: bad subscript setter}}
sub[0] += "" // expected-error {{getter for 'subscript(_:)' is unavailable: bad subscript getter}} expected-error {{setter for 'subscript(_:)' is unavailable: bad subscript setter}}

_ = subGetter[0] // expected-error {{getter for 'subscript' is unavailable: bad subscript getter}}
_ = subGetter[0] // expected-error {{getter for 'subscript(_:)' is unavailable: bad subscript getter}}
subGetter[0] = ""
subGetter[0] += "" // expected-error {{getter for 'subscript' is unavailable: bad subscript getter}}
subGetter[0] += "" // expected-error {{getter for 'subscript(_:)' is unavailable: bad subscript getter}}

_ = subSetter[0]
subSetter[0] = "" // expected-error {{setter for 'subscript' is unavailable: bad subscript setter}}
subSetter[0] += "" // expected-error {{setter for 'subscript' is unavailable: bad subscript setter}}
subSetter[0] = "" // expected-error {{setter for 'subscript(_:)' is unavailable: bad subscript setter}}
subSetter[0] += "" // expected-error {{setter for 'subscript(_:)' is unavailable: bad subscript setter}}

_ = subReadOnly[0] // expected-error {{getter for 'subscript' is unavailable}}
_ = subReadOnly[0] // expected-error {{getter for 'subscript(_:)' is unavailable}}
}

func test_deprecated(_ s:UnsafeMutablePointer<CChar>, _ obj: AccessorDeprecations,
Expand Down Expand Up @@ -100,19 +100,19 @@ func test_deprecated(_ s:UnsafeMutablePointer<CChar>, _ obj: AccessorDeprecation
AccessorDeprecations.setterDeprecatedClass = 0 // expected-warning {{setter for 'setterDeprecatedClass' is deprecated}}
AccessorDeprecations.setterDeprecatedClass += 1 // expected-warning {{setter for 'setterDeprecatedClass' is deprecated}}

_ = sub[0] // expected-warning {{getter for 'subscript' is deprecated: bad subscript getter}}
sub[0] = "" // expected-warning {{setter for 'subscript' is deprecated: bad subscript setter}}
sub[0] += "" // expected-warning {{getter for 'subscript' is deprecated: bad subscript getter}} expected-warning {{setter for 'subscript' is deprecated: bad subscript setter}}
_ = sub[0] // expected-warning {{getter for 'subscript(_:)' is deprecated: bad subscript getter}}
sub[0] = "" // expected-warning {{setter for 'subscript(_:)' is deprecated: bad subscript setter}}
sub[0] += "" // expected-warning {{getter for 'subscript(_:)' is deprecated: bad subscript getter}} expected-warning {{setter for 'subscript(_:)' is deprecated: bad subscript setter}}

_ = subGetter[0] // expected-warning {{getter for 'subscript' is deprecated: bad subscript getter}}
_ = subGetter[0] // expected-warning {{getter for 'subscript(_:)' is deprecated: bad subscript getter}}
subGetter[0] = ""
subGetter[0] += "" // expected-warning {{getter for 'subscript' is deprecated: bad subscript getter}}
subGetter[0] += "" // expected-warning {{getter for 'subscript(_:)' is deprecated: bad subscript getter}}

_ = subSetter[0]
subSetter[0] = "" // expected-warning {{setter for 'subscript' is deprecated: bad subscript setter}}
subSetter[0] += "" // expected-warning {{setter for 'subscript' is deprecated: bad subscript setter}}
subSetter[0] = "" // expected-warning {{setter for 'subscript(_:)' is deprecated: bad subscript setter}}
subSetter[0] += "" // expected-warning {{setter for 'subscript(_:)' is deprecated: bad subscript setter}}

_ = subReadOnly[0] // expected-warning {{getter for 'subscript' is deprecated}}
_ = subReadOnly[0] // expected-warning {{getter for 'subscript(_:)' is deprecated}}
}

func test_NSInvocation(_ x: NSInvocation, // expected-error {{'NSInvocation' is unavailable}}
Expand Down
8 changes: 4 additions & 4 deletions test/Compatibility/attr_override.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class A {
var v9: Int { return 5 } // expected-note{{attempt to override property here}}
var v10: Int { return 5 } // expected-note{{attempt to override property here}}

subscript (i: Int) -> String { // expected-note{{potential overridden subscript 'subscript' here}}
subscript (i: Int) -> String { // expected-note{{potential overridden subscript 'subscript(_:)' here}}
get {
return "hello"
}
Expand All @@ -49,7 +49,7 @@ class A {
}
}

subscript (d: Double) -> String { // expected-note{{overridden declaration is here}} expected-note{{potential overridden subscript 'subscript' here}}
subscript (d: Double) -> String { // expected-note{{overridden declaration is here}} expected-note{{potential overridden subscript 'subscript(_:)' here}}
get {
return "hello"
}
Expand All @@ -58,11 +58,11 @@ class A {
}
}

subscript (i: Int8) -> A { // expected-note{{potential overridden subscript 'subscript' here}}
subscript (i: Int8) -> A { // expected-note{{potential overridden subscript 'subscript(_:)' here}}
get { return self }
}

subscript (i: Int16) -> A { // expected-note{{attempt to override subscript here}} expected-note{{potential overridden subscript 'subscript' here}}
subscript (i: Int16) -> A { // expected-note{{attempt to override subscript here}} expected-note{{potential overridden subscript 'subscript(_:)' here}}
get { return self }
set { }
}
Expand Down
2 changes: 1 addition & 1 deletion test/Compatibility/special_func_name.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct S12 : P1 { // expected-error {{type 'S12' does not conform to protocol 'P
}

protocol P2 {
init(_: Int) // expected-note {{protocol requires initializer 'init' with type 'Int'; do you want to add a stub?}}
init(_: Int) // expected-note {{protocol requires initializer 'init(_:)' with type 'Int'; do you want to add a stub?}}
}

struct S21 : P2 { // expected-error {{type 'S21' does not conform to protocol 'P2'}}
Expand Down
8 changes: 4 additions & 4 deletions test/Compatibility/tuple_arguments_4.swift
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ do {
}

struct InitTwo {
init(_ x: Int, _ y: Int) {} // expected-note 5 {{'init' declared here}}
init(_ x: Int, _ y: Int) {} // expected-note 5 {{'init(_:_:)' declared here}}
}

struct InitTuple {
Expand Down Expand Up @@ -564,7 +564,7 @@ do {
}

struct SubscriptTwo {
subscript(_ x: Int, _ y: Int) -> Int { get { return 0 } set { } } // expected-note 5 {{'subscript' declared here}}
subscript(_ x: Int, _ y: Int) -> Int { get { return 0 } set { } } // expected-note 5 {{'subscript(_:_:)' declared here}}
}

struct SubscriptTuple {
Expand Down Expand Up @@ -915,7 +915,7 @@ struct GenericInitLabeled<T> {
}

struct GenericInitTwo<T> {
init(_ x: T, _ y: T) {} // expected-note 10 {{'init' declared here}}
init(_ x: T, _ y: T) {} // expected-note 10 {{'init(_:_:)' declared here}}
}

struct GenericInitTuple<T> {
Expand Down Expand Up @@ -1041,7 +1041,7 @@ struct GenericSubscriptLabeled<T> {
}

struct GenericSubscriptTwo<T> {
subscript(_ x: T, _ y: T) -> Int { get { return 0 } set { } } // expected-note 5 {{'subscript' declared here}}
subscript(_ x: T, _ y: T) -> Int { get { return 0 } set { } } // expected-note 5 {{'subscript(_:_:)' declared here}}
}

struct GenericSubscriptLabeledTuple<T> {
Expand Down
2 changes: 1 addition & 1 deletion test/Constraints/diag_ambiguities.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func g(_ x: Int, _ y: Int) -> () {} // expected-note{{found this candidate}}
C(g) // expected-error{{ambiguous use of 'g'}}

func h<T>(_ x: T) -> () {}
C(h) // expected-error{{ambiguous use of 'init'}}
C(h) // expected-error{{ambiguous use of 'init(_:)'}}

func rdar29691909_callee(_ o: AnyObject?) -> Any? { return o } // expected-note {{found this candidate}}
func rdar29691909_callee(_ o: AnyObject) -> Any { return o } // expected-note {{found this candidate}}
Expand Down
4 changes: 2 additions & 2 deletions test/Constraints/diagnostics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ func r23641896() {
var g = "Hello World"
g.replaceSubrange(0...2, with: "ce") // expected-error {{cannot convert value of type 'ClosedRange<Int>' to expected argument type 'Range<String.Index>'}}

_ = g[12] // expected-error {{'subscript' is unavailable: cannot subscript String with an Int, see the documentation comment for discussion}}
_ = g[12] // expected-error {{'subscript(_:)' is unavailable: cannot subscript String with an Int, see the documentation comment for discussion}}

}

Expand Down Expand Up @@ -1199,7 +1199,7 @@ func platypus<T>(a: [T]) {
func badTypes() {
let sequence:AnySequence<[Int]> = AnySequence() { AnyIterator() { [3] }}
let array = [Int](sequence)
// expected-error@-1 {{initializer 'init' requires the types 'Int' and '[Int]' be equivalent}}
// expected-error@-1 {{initializer 'init(_:)' requires the types 'Int' and '[Int]' be equivalent}}
}

// rdar://34357545
Expand Down
2 changes: 1 addition & 1 deletion test/Constraints/generics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ struct V27515965 {

func test(x: S27515965) -> V27515965 {
return V27515965(x)
// expected-error@-1 {{initializer 'init' requires the types 'Any' and 'Float' be equivalent}}
// expected-error@-1 {{initializer 'init(_:)' requires the types 'Any' and 'Float' be equivalent}}
}

protocol BaseProto {}
Expand Down
2 changes: 1 addition & 1 deletion test/Constraints/lvalues.swift
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ r23331567 { $0 += 1 }
// <rdar://problem/30685195> Compiler crash with invalid assignment
struct G<T> {
subscript(x: Int) -> T { get { } nonmutating set { } }
// expected-note@-1 {{'subscript' declared here}}
// expected-note@-1 {{'subscript(_:)' declared here}}
}

func wump<T>(to: T, _ body: (G<T>) -> ()) {}
Expand Down
2 changes: 1 addition & 1 deletion test/Constraints/rdar44569159.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ struct A {

func foo(_ v: Double) {
_ = A()[S(value: v)]
// expected-error@-1 {{subscript 'subscript' requires that 'Double' conform to 'P'}}
// expected-error@-1 {{subscript 'subscript(_:)' requires that 'Double' conform to 'P'}}
// expected-error@-2 {{referencing initializer 'init(value:)' on 'S' requires that 'Double' conform to 'P'}}
}
2 changes: 1 addition & 1 deletion test/Constraints/subscript.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ extension Int {
subscript(key: String) -> Double { get {} } // expected-note {{found this candidate}}
}

let _ = 1["1"] // expected-error {{ambiguous use of 'subscript'}}
let _ = 1["1"] // expected-error {{ambiguous use of 'subscript(_:)'}}

let squares = [ 1, 2, 3 ].reduce([:]) { (dict, n) in
var dict = dict
Expand Down
2 changes: 1 addition & 1 deletion test/Constraints/tuple.swift
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ struct MagicKingdom<K> : Kingdom {
}
func magify<T>(_ t: T) -> MagicKingdom<T> { return MagicKingdom() }
func foo(_ pair: (Int, Int)) -> Victory<(x: Int, y: Int)> {
return Victory(magify(pair)) // expected-error {{initializer 'init' requires the types '(x: Int, y: Int)' and '(Int, Int)' be equivalent}}
return Victory(magify(pair)) // expected-error {{initializer 'init(_:)' requires the types '(x: Int, y: Int)' and '(Int, Int)' be equivalent}}
}


Expand Down
8 changes: 4 additions & 4 deletions test/Constraints/tuple_arguments.swift
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ do {
}

struct InitTwo {
init(_ x: Int, _ y: Int) {} // expected-note 5 {{'init' declared here}}
init(_ x: Int, _ y: Int) {} // expected-note 5 {{'init(_:_:)' declared here}}
}

struct InitTuple {
Expand Down Expand Up @@ -565,7 +565,7 @@ do {
}

struct SubscriptTwo {
subscript(_ x: Int, _ y: Int) -> Int { get { return 0 } set { } } // expected-note 5 {{'subscript' declared here}}
subscript(_ x: Int, _ y: Int) -> Int { get { return 0 } set { } } // expected-note 5 {{'subscript(_:_:)' declared here}}
}

struct SubscriptTuple {
Expand Down Expand Up @@ -916,7 +916,7 @@ struct GenericInitLabeled<T> {
}

struct GenericInitTwo<T> {
init(_ x: T, _ y: T) {} // expected-note 10 {{'init' declared here}}
init(_ x: T, _ y: T) {} // expected-note 10 {{'init(_:_:)' declared here}}
}

struct GenericInitTuple<T> {
Expand Down Expand Up @@ -1042,7 +1042,7 @@ struct GenericSubscriptLabeled<T> {
}

struct GenericSubscriptTwo<T> {
subscript(_ x: T, _ y: T) -> Int { get { return 0 } set { } } // expected-note 5 {{'subscript' declared here}}
subscript(_ x: T, _ y: T) -> Int { get { return 0 } set { } } // expected-note 5 {{'subscript(_:_:)' declared here}}
}

struct GenericSubscriptLabeledTuple<T> {
Expand Down
4 changes: 2 additions & 2 deletions test/IDE/reconstruct_type_from_mangled_name.swift
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ func hasLocalDecls() {
// CHECK: FAILURE for 'localMethod'
func localMethod() {}

// CHECK: FAILURE for 'subscript'
// CHECK: FAILURE for 'subscript(_:)'
subscript(x: Int) { get {} set {} }

// CHECK: decl: FAILURE for ''
Expand Down Expand Up @@ -304,7 +304,7 @@ struct HasSubscript {
// FIXME
// CHECK: decl: FAILURE for 'T' usr=s:14swift_ide_test19HasGenericSubscriptV1Txmfp
struct HasGenericSubscript<T> {
// CHECK: subscript<U>(t: T) -> U { get set } for 'subscript' usr=s:14swift_ide_test19HasGenericSubscriptVyqd__xclui
// CHECK: subscript<U>(t: T) -> U { get set } for 'subscript(_:)' usr=s:14swift_ide_test19HasGenericSubscriptVyqd__xclui
// FIXME
// CHECK: decl: FAILURE for 'U'
// FIXME
Expand Down
2 changes: 1 addition & 1 deletion test/NameBinding/accessibility.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ _ = Foo() // expected-error {{'Foo' initializer is inaccessible due to 'internal
// <rdar://problem/27982012> QoI: Poor diagnostic for inaccessible initializer
struct rdar27982012 {
var x: Int
private init(_ x: Int) { self.x = x } // expected-note {{'init' declared here}}
private init(_ x: Int) { self.x = x } // expected-note {{'init(_:)' declared here}}
}

_ = { rdar27982012($0.0) }((1, 2)) // expected-error {{initializer is inaccessible due to 'private' protection level}}
Expand Down
4 changes: 2 additions & 2 deletions test/NameBinding/scope_map.swift
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ class LazyProperties {

// CHECK-EXPANDED: TypeDecl {{.*}} StructContainsAbstractStorageDecls [114:1 - 130:1] expanded
// CHECK-EXPANDED-NEXT: `-TypeOrExtensionBody {{.*}} 'StructContainsAbstractStorageDecls' [114:43 - 130:1] expanded
// CHECK-EXPANDED-NEXT: {{^}} |-Accessors {{.*}} scope_map.(file).StructContainsAbstractStorageDecls.subscript@{{.*}}scope_map.swift:115:3 [115:37 - 121:3] expanded
// CHECK-EXPANDED-NEXT: {{^}} |-Accessors {{.*}} scope_map.(file).StructContainsAbstractStorageDecls.subscript(_:_:)@{{.*}}scope_map.swift:115:3 [115:37 - 121:3] expanded
// CHECK-EXPANDED-NEXT: {{^}} |-AbstractFunctionDecl {{.*}} _ [116:5 - 117:5] expanded
// CHECK-EXPANDED-NEXT: {{^}} `-AbstractFunctionParams {{.*}} _ param 0:0 [116:5 - 117:5] expanded
// CHECK-EXPANDED-NEXT: {{^}} `-AbstractFunctionParams {{.*}} _ param 1:0 [116:5 - 117:5] expanded
Expand Down Expand Up @@ -404,7 +404,7 @@ class LazyProperties {
// CHECK-EXPANDED-NEXT: {{^}} `-BraceStmt {{.*}} [167:32 - 167:42] expanded
// CHECK-EXPANDED-NEXT: {{^}} `-AbstractFunctionParams {{.*}} defaultArguments(i:j:) param 0:1 [167:48 - 175:1] expanded

// CHECK-EXPANDED: -Accessors {{.*}} scope_map.(file).ProtoWithSubscript.subscript@{{.*}}scope_map.swift:183:3 [183:33 - 183:43] expanded
// CHECK-EXPANDED: -Accessors {{.*}} scope_map.(file).ProtoWithSubscript.subscript(_:)@{{.*}}scope_map.swift:183:3 [183:33 - 183:43] expanded
// CHECK-EXPANDED-NEXT: |-AbstractFunctionDecl {{.*}} _ [183:35 - 183:35] expanded
// CHECK-EXPANDED-NEXT: `-AbstractFunctionParams {{.*}} _ param 0:0 [183:35 - 183:35] expanded
// CHECK-EXPANDED-NEXT: `-AbstractFunctionParams {{.*}} _ param 1:0 [183:35 - 183:35] expanded
Expand Down
2 changes: 1 addition & 1 deletion test/Parse/pointer_conversion.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ func takesRawBuffer(_ b: UnsafeRawBufferPointer) {}

// <rdar://problem/29586888> UnsafeRawBufferPointer range subscript is inconsistent with Collection.
func f29586888(b: UnsafeRawBufferPointer) {
takesRawBuffer(b[1..<2]) // expected-error {{'subscript' is unavailable: use 'UnsafeRawBufferPointer(rebasing:)' to convert a slice into a zero-based raw buffer.}}
takesRawBuffer(b[1..<2]) // expected-error {{'subscript(_:)' is unavailable: use 'UnsafeRawBufferPointer(rebasing:)' to convert a slice into a zero-based raw buffer.}}
let slice = b[1..<2]
takesRawBuffer(slice) // expected-error {{cannot convert value of type 'UnsafeRawBufferPointer.SubSequence' (aka 'Slice<UnsafeRawBufferPointer>') to expected argument type 'UnsafeRawBufferPointer'}}
}
4 changes: 2 additions & 2 deletions test/Sema/availability.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ClassWithUnavailable {
}

@available(*, unavailable)
subscript (i: Int) -> Int { // expected-note{{'subscript' has been explicitly marked unavailable here}}
subscript (i: Int) -> Int { // expected-note{{'subscript(_:)' has been explicitly marked unavailable here}}
return i
}
}
Expand All @@ -55,7 +55,7 @@ func testInit() {
}

func testSubscript(cwu: ClassWithUnavailable) {
_ = cwu[5] // expected-error{{'subscript' is unavailable}}
_ = cwu[5] // expected-error{{'subscript(_:)' is unavailable}}
}

/* FIXME 'nil == a' fails to type-check with a bogus error message
Expand Down
8 changes: 4 additions & 4 deletions test/Sema/availability_versions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ class ClassWithUnavailableInitializer {
convenience init(s: String) {
// expected-note@-1 {{add @available attribute to enclosing initializer}}

self.init(5) // expected-error {{'init' is only available on OS X 10.51 or newer}}
self.init(5) // expected-error {{'init(_:)' is only available on OS X 10.51 or newer}}
// expected-note@-1 {{add 'if #available' version check}}
}

Expand All @@ -267,12 +267,12 @@ func callUnavailableInitializer() {
// expected-note@-1 2{{add @available attribute to enclosing global function}}

_ = ClassWithUnavailableInitializer()
_ = ClassWithUnavailableInitializer(5) // expected-error {{'init' is only available on OS X 10.51 or newer}}
_ = ClassWithUnavailableInitializer(5) // expected-error {{'init(_:)' is only available on OS X 10.51 or newer}}
// expected-note@-1 {{add 'if #available' version check}}

let i = ClassWithUnavailableInitializer.self
_ = i.init()
_ = i.init(5) // expected-error {{'init' is only available on OS X 10.51 or newer}}
_ = i.init(5) // expected-error {{'init(_:)' is only available on OS X 10.51 or newer}}
// expected-note@-1 {{add 'if #available' version check}}
}

Expand All @@ -290,7 +290,7 @@ class SubOfClassWithUnavailableInitializer : SuperWithWithUnavailableInitializer
override init(_ val: Int) {
// expected-note@-1 {{add @available attribute to enclosing initializer}}

super.init(5) // expected-error {{'init' is only available on OS X 10.51 or newer}}
super.init(5) // expected-error {{'init(_:)' is only available on OS X 10.51 or newer}}
// expected-note@-1 {{add 'if #available' version check}}
}

Expand Down
2 changes: 1 addition & 1 deletion test/Serialization/builtin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ var a : TheBuiltinInt64

// Check that it really is Builtin.Int64.
var wrapped = Int64(a) // okay
var badWrapped = Int32(a) // expected-error{{initializer 'init' requires that 'TheBuiltinInt64' conform to 'BinaryInteger'}}
var badWrapped = Int32(a) // expected-error{{initializer 'init(_:)' requires that 'TheBuiltinInt64' conform to 'BinaryInteger'}}
Loading