penrose / penrose

Create beautiful diagrams just by typing notation in plain text.

Home Page:https://penrose.cs.cmu.edu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Confusing error message when referring to Style variables not declared in header

liangyiliang opened this issue · comments

Describe the bug

Suppose I wrote this in Style:

forall T t {
  y.abc = 1
}

with Substance T t.

The compiler gives an error Expected to find shape already defined to hold property 1:0:y.abc (at line 7, column 3 of Style program), found nothing.

Here, y is supposed to refer to either a Style variable or a Substance variable. Because y cannot be found in the context of the Style block (not in the Style header), the error message should read something to the effect of Cannot find y.