diff --git a/docs/rawget-type-operator.md b/docs/rawget-type-operator.md index 4b37006..4e2c778 100644 --- a/docs/rawget-type-operator.md +++ b/docs/rawget-type-operator.md @@ -36,6 +36,8 @@ local key = "property" type age = rawget -- Error message: Second argument to rawget is not a valid index type; Unknown type 'key' ``` +Note: `rawget` type operator does not work on class types because they do not have direct fields that can be looked up without invoking its metamethod. + The implementation effort for this type operator is very minimal. Since the `rawget` type operator functions similarly to the `index` type operator, we can reuse the functions already used to implement the `index` type operator. ## Drawbacks