Type-checking is missing for some &attributes

Description

The appended script

doesn't generate any complaints about the non-sensical attributes; and the one attribute that does make sense, &default, doesn't work, this script generates an error complaining about a's value not being set.

Environment

None

Activity

Show:
Jon Siwek
September 6, 2018, 2:05 AM

I'd probably say even &default doesn't make sense to permit there? One probably would initialize a default value via = assignment instead?

Vern Paxson
September 6, 2018, 5:16 AM
Edited

You mean why use "global a: count &default = 5" instead of "global a = 5"? Yeah, I agree. There are maybe microcases where there's a semantic difference (like when assigning to an &optional record field), but that's about it.

Jon Siwek
September 6, 2018, 5:50 AM

Yeah, that's all I meant: &default doesn't seem useful in the case of of a global.

Jon Siwek
September 18, 2018, 6:21 AM
Moved

Assignee

Unassigned

Reporter

Vern Paxson

Labels

None

External issue ID

None

Components

Priority

Low