JSMonk / hegel

An advanced static type checker
https://hegel.js.org
MIT License
2.09k stars 59 forks source link

Issue with type refinement when union of primitive types is unboxed #171

Closed srg-kostyrko closed 4 years ago

srg-kostyrko commented 4 years ago

https://hegel.js.org/try#GYVwdgxgLglg9mABAJwKYAdUEMoAopbIDmqUAXIgM5TIxhGIA+iYIAtgEarIA0isbVJQqtO3AJQVqtekxbsuyRAG8AUIkQxgifAE9McbQWKlEAXguIARKMVXxK9RpSkQyJMZJREAKh-8YQUoAbicAXyc0KDcPQi8AOjRMHHxAoXFQsMRVVQB6XMQAUWRkOGQKABV9VGtgLAAbSlQrTUpNSDg2dBwYDnqagHcYKAALfmrrW245aToiK1Uk7Dw6xtQ+ABYM1SA

The issue is discovered on the latest version in master - hegel.js.org running 0.0.40 is fine

JSMonk commented 4 years ago

Okay. We will try to understand the problem in the snippet.