Skip to content

Commit a1bcbe8

Browse files
committed
update tests
fix conflict with reflection test
1 parent 92a12c0 commit a1bcbe8

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

test/Reflection/typeref_lowering.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,9 +1032,7 @@
10321032
// CHECK-64: (struct TypeLowering.EnumStruct)
10331033
// CHECK-64-NEXT: (struct size=81 alignment=8 stride=88 num_extra_inhabitants=[[PTR_XI]] bitwise_takable=1
10341034
// CHECK-64-NEXT: (field name=empty offset=0
1035-
// CHECK-64-NEXT: (struct size=0 alignment=1 stride=1 num_extra_inhabitants=0 bitwise_takable=1
1036-
// CHECK-64-NEXT: (field name=value offset=0
1037-
// CHECK-64-NEXT: (no_payload_enum size=0 alignment=1 stride=1 num_extra_inhabitants=0 bitwise_takable=1))))
1035+
// CHECK-64-NEXT: (no_payload_enum size=0 alignment=1 stride=1 num_extra_inhabitants=0 bitwise_takable=1))
10381036
// CHECK-64-NEXT: (field name=noPayload offset=0
10391037
// CHECK-64-NEXT: (no_payload_enum size=1 alignment=1 stride=1 num_extra_inhabitants=0 bitwise_takable=1))
10401038
// CHECK-64-NEXT: (field name=sillyNoPayload offset=1

test/decl/var/properties.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,6 +1270,10 @@ class WeakFixItTest {
12701270

12711271
// SR-8811 (Warning)
12721272

1273-
let sr8811x = fatalError() // expected-warning {{variable 'sr8811x' inferred to have type 'Never', which may be unexpected}} expected-note {{add an explicit type annotation to silence this warning}}
1273+
let sr8811a = fatalError() // expected-warning {{constant 'sr8811a' inferred to have type 'Never', which is an enum with no cases}} expected-note {{add an explicit type annotation to silence this warning}}
12741274

1275-
let sr8811y: Never = fatalError() // Ok
1275+
let sr8811b: Never = fatalError() // Ok
1276+
1277+
let sr8811c = (16, fatalError()) // expected-warning {{constant 'sr8811c' inferred to have type '(Int, Never)', which contains an enum with no cases}} expected-note {{add an explicit type annotation to silence this warning}}
1278+
1279+
let sr8811d: (Int, Never) = (16, fatalError()) // Ok

test/expr/expressions.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,9 +584,9 @@ func conversionTest(_ a: inout Double, b: inout Int) {
584584
var pi_f3 = float.init(getPi()) // expected-error {{ambiguous use of 'init(_:)'}}
585585
var pi_f4 = float.init(pi_f)
586586

587-
var e = Empty(f) // expected-warning {{variable 'e' inferred to have type 'Empty', which may be unexpected}} expected-note {{add an explicit type annotation to silence this warning}}
587+
var e = Empty(f) // expected-warning {{variable 'e' inferred to have type 'Empty', which is an enum with no cases}} expected-note {{add an explicit type annotation to silence this warning}}
588588
var e2 = Empty(d) // expected-error{{cannot convert value of type 'Double' to expected argument type 'Float'}}
589-
var e3 = Empty(Float(d)) // expected-warning {{variable 'e3' inferred to have type 'Empty', which may be unexpected}} expected-note {{add an explicit type annotation to silence this warning}}
589+
var e3 = Empty(Float(d)) // expected-warning {{variable 'e3' inferred to have type 'Empty', which is an enum with no cases}} expected-note {{add an explicit type annotation to silence this warning}}
590590
}
591591

592592
struct Rule { // expected-note {{'init(target:dependencies:)' declared here}}

0 commit comments

Comments
 (0)