File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -115,10 +115,11 @@ func (t *arrayType) String() string {
115
115
}
116
116
117
117
func (t * arrayType ) InstanceOf (t2 Type ) bool {
118
- if array , ok := t2 .(* arrayType ); ok {
119
- return t .arg .InstanceOf (array .arg )
118
+ array , ok := t2 .(* arrayType )
119
+ if ! ok {
120
+ return false
120
121
}
121
- return false
122
+ return t . arg . InstanceOf ( array . arg )
122
123
}
123
124
124
125
// ===================== Object type ===================== //
@@ -137,10 +138,11 @@ func (t *objectType) String() string {
137
138
}
138
139
139
140
func (t * objectType ) InstanceOf (t2 Type ) bool {
140
- if array , ok := t2 .(* objectType ); ok {
141
- return t .arg .InstanceOf (array .arg )
141
+ object , ok := t2 .(* objectType )
142
+ if ! ok {
143
+ return false
142
144
}
143
- return false
145
+ return t . arg . InstanceOf ( object . arg )
144
146
}
145
147
146
148
// ===================== Any type ===================== //
You can’t perform that action at this time.
0 commit comments