Suggest replacing typeof(...) with an actual type
This commit suggests replacing typeof(...) with an actual type of "...", for example in case of `typeof(1)` we suggest replacing it with `i32`. If the expression - Is not const (`{ let a = 1; let _: typeof(a); }`) - Can't be found (`let _: typeof(this_variable_does_not_exist)`) - Or has non-suggestable type (closure, generator, error, etc) we don't suggest anything.
This commit is contained in:
parent
fa72316031
commit
d5440926e2
3 changed files with 17 additions and 3 deletions
|
@ -62,6 +62,7 @@ typeck-functional-record-update-on-non-struct =
|
|||
|
||||
typeck-typeof-reserved-keyword-used =
|
||||
`typeof` is a reserved keyword but unimplemented
|
||||
.suggestion = consider replacing `typeof(...)` with an actual type
|
||||
.label = reserved keyword
|
||||
|
||||
typeck-return-stmt-outside-of-fn-body =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue