#1870·pkl

Incorrect parameterized typecheck

Author: bioballCreated Sep 22, 2026Updated Sep 22, 2026

This code:

pkl
class Foo { bar: Int }
const function isOk(f: Foo) = f.bar > 0
typealias T<X> = Int(isOk(new { bar = 1 }) && this is X)

res = 3 is T<String>

Gives

res = true

But should be:

res = false