[solved][Relay] Broken case of type infer

import tvm
import tvm.relay as relay
import numpy as np

x = relay.var("x", shape=(16,))
x1 = relay.var("x1", shape=(16,))
answer = relay.TypeVar("answer")
k = relay.Var("k", relay.FuncType([relay.TensorType((16,))], answer))
F = relay.Let(x1, x, relay.Call(k, [x1]))
F = relay.Function([x, k], F, type_params=[answer])
F = relay.ir_pass.infer_type(F)

ret = relay.var("ret", shape=(16,))
cont = relay.Function([ret], ret)

x = relay.var("x", shape=(16,))
F = relay.Call(F, [x, cont])

F = relay.Function([x], F)
F = relay.ir_pass.infer_type(F) # comment out this line then everything is fine

F = relay.ir_pass.to_a_normal_form(F)
F = relay.ir_pass.infer_type(F)

gives error

fn (%x: Tensor[(16,), float32]) -> Tensor[(16,), float32] {
  let %x1: meta[relay.IncompleteType][0] = fn (%ret: Tensor[(16,), float32]) -> Tensor[(16,), float32] {
  let %x2: meta[relay.IncompleteType][1] = fn <%answer>(%x3: Tensor[(16,), float32], %k: fn (Tensor[(16,), float32]) -> %answer) -> %answer {
    let %x4: meta[relay.IncompleteType][2] = let %x11: Tensor[(16,), float32] = %x3
    let %x5: meta[relay.IncompleteType][3] = %k(%x11)
  let %x6: meta[relay.IncompleteType][4] = %x2(%x, %x1)Incorrect number of type args in (nullptr): 
Expected 0 but got 1

The error is possibly that x2 has no type params after Unify with IncompleteType in

@jroesch @MarisaKirisame


solved in latest master


yeah, we both hit the same error, lol