File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -module-name ValueGeneric
3
+ // RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -module-name ValueGeneric
4
+ // RUN: %FileCheck %s < %t.swiftinterface
5
+
6
+ // CHECK: public struct Vector<Element, let N : Swift.Int>
7
+ public struct Vector < Element, let N: Int > {
8
+ // CHECK-LABEL: public var count: Swift.Int {
9
+ // CHECK-NEXT: get {
10
+ // CHECK-NEXT: N
11
+ // CHECK-NEXT: }
12
+ // CHECK-NEXT: }
13
+ @inlinable
14
+ public var count : Int {
15
+ N
16
+ }
17
+ }
18
+
19
+ // CHECK: public func usesGenericVector<let N : Swift.Int>(_: ValueGeneric.Vector<Swift.Int, N>)
20
+ public func usesGenericVector< let N: Int > ( _: Vector < Int , N > ) { }
21
+
22
+ // CHECK: public func usesConcreteVector(_: ValueGeneric.Vector<Swift.Int, 2>)
23
+ public func usesConcreteVector( _: Vector < Int , 2 > ) { }
24
+
25
+ // CHECK: public func usesNegativeVector(_: ValueGeneric.Vector<Swift.String, -10>)
26
+ public func usesNegativeVector( _: Vector < String , - 10 > ) { }
You can’t perform that action at this time.
0 commit comments