You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assignment of an incorrect type to a map is reported at the location of the map expression, while an assignment of an incorrect type to a variable is reported at the location of the entire assignment statement:
# bpftrace -e 'BEGIN { @a = ""; @a = 1; }'
stdin:1:18-20: ERROR: Type mismatch for @a: trying to assign value of type 'int64' when map already contains a value of type 'string[1]
BEGIN { @a = ""; @a = 1; }
~~
# bpftrace -e 'BEGIN { $a = ""; $a = 1; }'
stdin:1:18-24: ERROR: Type mismatch for $a: trying to assign value of type 'int64' when variable already contains a value of type 'string[1]'
BEGIN { $a = ""; $a = 1; }
~~~~~~
Ideally, the reported location of the error should be consistent between these two cases.
The text was updated successfully, but these errors were encountered:
Assignment of an incorrect type to a map is reported at the location of the map expression, while an assignment of an incorrect type to a variable is reported at the location of the entire assignment statement:
Ideally, the reported location of the error should be consistent between these two cases.
The text was updated successfully, but these errors were encountered: