tokiwa-software / fuzion

The Fuzion Language Implementation
https://fuzion-lang.dev
GNU General Public License v3.0
48 stars 11 forks source link

for scoped fields, error message should not suggest making it `public` #4199

Closed maxteufel closed 10 hours ago

maxteufel commented 1 week ago

The new error message "Unused, non public field" shows up even in cases like this:

src/Session.fz:176:7: error 2: Unused, non public field 'e'
      e error => panic "error reading from path: {file}"

To solve this, either
  - use the field
  - make it 'public'
or
  - explicitly ignore the result '_ := …'

where (in this example) a match is present. For cases like this, and likewise for all cases where the field is scoped, the error message should not suggest to make the field public because that will not make sense.