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
Currently it's not possible to write use functions that take preflight class objects as parameters, since accessing any fields or calling any methods on the object will result in a compilation error:
error: Expression of type "Bucket" references an unknown preflight object, can't qualify its capabilities
--> wing/main.w:7:14
|
7 | for key in bucket.list(prefix) {
| ^^^^^^
|
= hint: Use a `lift` block to explicitly qualify the preflight object and disable this error
= hint: For details see: https://www.winglang.io/docs/concepts/inflights#explicit-lift-qualification
error: Expression of type "Bucket" references an unknown preflight object, can't qualify its capabilities
--> wing/main.w:8:5
|
8 | bucket.delete(key);
| ^^^^^^
|
= hint: Use a `lift` block to explicitly qualify the preflight object and disable this error
= hint: For details see: https://www.winglang.io/docs/concepts/inflights#explicit-lift-qualification
The reason for these errors is that the lifting system used to automatically generate permissions does not track or calculate enough information to support these types of examples.
Use Case
Currently it's not possible to write use functions that take preflight class objects as parameters, since accessing any fields or calling any methods on the object will result in a compilation error:
As of writing the following errors are raised:
The reason for these errors is that the lifting system used to automatically generate permissions does not track or calculate enough information to support these types of examples.
Related to #76
Proposed Solution
No response
Implementation Notes
No response
Component
Compiler
Community Notes
The text was updated successfully, but these errors were encountered: