@@ -164,6 +164,65 @@ class Call : TsMethodTestRunner() {
164164 { r -> r.number == 30.0 }
165165 )
166166 }
167+
168+ @Disabled(" Static calls are broken in IR" )
169+ @Test
170+ fun `test static` () {
171+ val method = getMethod(className, " callStatic" )
172+ discoverProperties<TsValue .TsNumber >(
173+ method = method,
174+ { r -> r.number == 50.0 }
175+ )
176+ }
177+
178+ @Disabled(" Inheritance is broken" )
179+ @Test
180+ fun `test virtual call` () {
181+ val method = getMethod(className, " callVirtual" )
182+ discoverProperties<TsValue .TsClass , TsValue .TsNumber >(
183+ method = method,
184+ { obj, r ->
185+ when (obj.name) {
186+ " Parent" -> r.number == 100.0
187+ " Child" -> r.number == 200.0
188+ else -> false
189+ }
190+ },
191+ )
192+ }
193+
194+ @Test
195+ fun `test virtual parent` () {
196+ val method = getMethod(className, " callVirtualParent" )
197+ discoverProperties<TsValue .TsNumber >(
198+ method = method,
199+ { r -> r.number == 100.0 },
200+ )
201+ }
202+
203+ @Disabled(" Calls to super are broken in IR" )
204+ @Test
205+ fun `test virtual child` () {
206+ val method = getMethod(className, " callVirtualChild" )
207+ discoverProperties<TsValue .TsNumber >(
208+ method = method,
209+ { r -> r.number == 200.0 },
210+ )
211+ }
212+
213+ @Disabled(" Too complex" )
214+ @Test
215+ fun `test virtual dispatch` () {
216+ val method = getMethod(className, " virtualDispatch" )
217+ discoverProperties<TsValue .TsClass , TsValue .TsNumber >(
218+ method = method,
219+ { obj, r -> obj.name == " Parent" && r.number == 100.0 },
220+ { obj, r -> obj.name == " Child" && r.number == 200.0 },
221+ invariants = arrayOf(
222+ { _, r -> r.number != - 1.0 },
223+ )
224+ )
225+ }
167226}
168227
169228fun fib (n : Double ): Double {
0 commit comments