rescript-compiler icon indicating copy to clipboard operation
rescript-compiler copied to clipboard

Better compilation error order for records

Open DZakh opened this issue 1 year ago • 1 comments

I have this case https://rescript-lang.org/try?version=v11.0.1&code=C4TwDgpgBAThDGB7GATKBeKBvAZgSwgBsUAuKAZ2BjwDsBzAXwCgnCJgocaMoAKAfTKIwwPIhoAeOElQA+AJQZZfeSwD0aqABUAFnnJQdAQwNGodRIjQQYMZFAC2EcuSN0IZXdHxE0OS1AoiM5QNIgcAEZE4nRQwIhx4NDSyChMGpw0vADKiE68uJZkAEQRRjDFDPKq6ZoA6npscXoGQc40AOQccEaEhCCGRGCeOskIqZwExJwB8Eadkd6IAK40KAB0tVAAks20ANZQAO7Q5Dor01FQRhFN8VDwo-CHwMYcr-pQn6-QAAbConEUnGcl+iUgUCi-jgcRgIFosXuSAcYDwd1GsBBaS4BX8iBKZQqVSYQA

I think the error message might be improved. I get the problem quite often while working with types from other modules, and it's difficult to track the wrong type without annotating every record explicitly.

DZakh avatar Jan 31 '24 14:01 DZakh

Well, probably it's a difficult fix, since it'll require treating unknown records as valid types

DZakh avatar Jan 31 '24 14:01 DZakh