forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGLKit_parse.swift
169 lines (142 loc) · 3.7 KB
/
GLKit_parse.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
// RUN: %target-build-swift -typecheck %s -Xfrontend -verify
// REQUIRES: executable_test
// REQUIRES: objc_interop
// UNSUPPORTED: OS=watchos
// UNSUPPORTED: OS=tvos
import GLKit
var v2: GLKVector2
_ = v2.x
_ = v2.y
_ = v2.z // expected-error {{value of type 'GLKVector2' (aka '_GLKVector2') has no member 'z'}}
_ = v2.w // expected-error {{value of type 'GLKVector2' (aka '_GLKVector2') has no member 'w'}}
_ = v2.s
_ = v2.t
_ = v2.p // expected-error {{value of type 'GLKVector2' (aka '_GLKVector2') has no member 'p'}}
_ = v2.q // expected-error {{value of type 'GLKVector2' (aka '_GLKVector2') has no member 'q'}}
// Vector2 does not have 'r' or 'g' components
_ = v2.r // expected-error {{value of type 'GLKVector2' (aka '_GLKVector2') has no member 'r'}}
_ = v2.g // expected-error {{value of type 'GLKVector2' (aka '_GLKVector2') has no member 'g'}}
_ = v2.b // expected-error {{value of type 'GLKVector2' (aka '_GLKVector2') has no member 'b'}}
_ = v2.a // expected-error {{value of type 'GLKVector2' (aka '_GLKVector2') has no member 'a'}}
_ = v2[0]
_ = v2[1]
var v3: GLKVector3
_ = v3.x
_ = v3.y
_ = v3.z
_ = v3.w // expected-error {{value of type 'GLKVector3' (aka '_GLKVector3') has no member 'w'}}
_ = v3.s
_ = v3.t
_ = v3.p
_ = v3.q // expected-error {{value of type 'GLKVector3' (aka '_GLKVector3') has no member 'q'}}
_ = v3.r
_ = v3.g
_ = v3.b
_ = v3.a // expected-error {{value of type 'GLKVector3' (aka '_GLKVector3') has no member 'a'}}
_ = v3[0]
_ = v3[1]
_ = v3[2]
var v4: GLKVector4
_ = v4.x
_ = v4.y
_ = v4.z
_ = v4.w
_ = v4.s
_ = v4.t
_ = v4.p
_ = v4.q
_ = v4.r
_ = v4.g
_ = v4.b
_ = v4.a
_ = v4[0]
_ = v4[1]
_ = v4[2]
_ = v4[3]
var q: GLKQuaternion
_ = q.x
_ = q.y
_ = q.z
_ = q.w
_ = q.v.x
_ = q.v.y
_ = q.v.z
_ = q.v.w // expected-error {{value of type 'GLKVector3' (aka '_GLKVector3') has no member 'w'}}
_ = q.s
_ = q[0]
_ = q[1]
_ = q[2]
_ = q[3]
var m2: GLKMatrix2
_ = m2.m00
_ = m2.m01
_ = m2.m02 // expected-error {{value of type 'GLKMatrix2' (aka '_GLKMatrix2') has no member 'm02'}}
_ = m2.m10
_ = m2.m11
_ = m2.m12 // expected-error {{value of type 'GLKMatrix2' (aka '_GLKMatrix2') has no member 'm12'}}
_ = m2.m20 // expected-error {{value of type 'GLKMatrix2' (aka '_GLKMatrix2') has no member 'm20'}}
_ = m2[0]
_ = m2[1]
_ = m2[2]
_ = m2[3]
var m3: GLKMatrix3
_ = m3.m00
_ = m3.m01
_ = m3.m02
_ = m3.m03 // expected-error {{value of type 'GLKMatrix3' (aka '_GLKMatrix3') has no member 'm03'}}
_ = m3.m10
_ = m3.m11
_ = m3.m12
_ = m3.m13 // expected-error {{value of type 'GLKMatrix3' (aka '_GLKMatrix3') has no member 'm13'}}
_ = m3.m20
_ = m3.m21
_ = m3.m22
_ = m3.m23 // expected-error {{value of type 'GLKMatrix3' (aka '_GLKMatrix3') has no member 'm23'}}
_ = m3.m30 // expected-error {{value of type 'GLKMatrix3' (aka '_GLKMatrix3') has no member 'm30'}}
_ = m3[0]
_ = m3[1]
_ = m3[2]
_ = m3[3]
_ = m3[4]
_ = m3[5]
_ = m3[6]
_ = m3[7]
_ = m3[8]
var m4: GLKMatrix4
_ = m4.m00
_ = m4.m01
_ = m4.m02
_ = m4.m03
_ = m4.m04 // expected-error {{value of type 'GLKMatrix4' (aka '_GLKMatrix4') has no member 'm04'}}
_ = m4.m10
_ = m4.m11
_ = m4.m12
_ = m4.m13
_ = m4.m14 // expected-error {{value of type 'GLKMatrix4' (aka '_GLKMatrix4') has no member 'm14'}}
_ = m4.m20
_ = m4.m21
_ = m4.m22
_ = m4.m23
_ = m4.m24 // expected-error {{value of type 'GLKMatrix4' (aka '_GLKMatrix4') has no member 'm24'}}
_ = m4.m30
_ = m4.m31
_ = m4.m32
_ = m4.m33
_ = m4.m34 // expected-error {{value of type 'GLKMatrix4' (aka '_GLKMatrix4') has no member 'm34'}}
_ = m4.m40 // expected-error {{value of type 'GLKMatrix4' (aka '_GLKMatrix4') has no member 'm40'}}
_ = m4[ 0]
_ = m4[ 1]
_ = m4[ 2]
_ = m4[ 3]
_ = m4[ 4]
_ = m4[ 5]
_ = m4[ 6]
_ = m4[ 7]
_ = m4[ 8]
_ = m4[ 9]
_ = m4[10]
_ = m4[11]
_ = m4[12]
_ = m4[13]
_ = m4[14]
_ = m4[15]