This commit is contained in:
Alexander Wang 2023-03-01 15:49:47 -08:00
parent 2997a6ef59
commit e504aca6d0
No known key found for this signature in database
GPG key ID: D89FA31966BDBECE

View file

@ -179,6 +179,8 @@ func (c *compiler) compileLink(refctx *RefContext) {
// Resolve underscores
for len(linkIDA) > 0 && linkIDA[0] == "_" {
if len(scopeIDA) < 2 {
// IR compiler only validates bad underscore usage
// The compiler will validate if the target board actually exists
c.errorf(refctx.Key.Key, "linked board not found")
return
}