-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempting to implement a Provided record #319
Comments
Not with this alone
You would need to modify the F# compiler (particularly |
I think i have a working version of the changes needed for intellisense to work properly.
it looks like the compiler is accessing the backing field prop1@ instead of the public property prop1 My guess is that i am missing a couple of attribute on the internal field that i generate in the type provider. Unfortunately, i can't reflect on the backing field of real record type to find out what are the expected attributes. Any pointers for how to solve this issue ? |
The backing fields were supposed internal instead of private |
Attempting to implement a Provided record
I am trying to implement a providedRecord for a type provider i a working on.
My approach was to decompile a normal record and try to implement the methods and attributes present in the decompiled class.
I used the decompiled code of this record as a template
here is the definition of the ProvidedRecord and an example of instantiation in a test Type Provider.
and here is an example of usage of that provider (reproduced here)
I get an error when i try to use the record constructor (see code above)
What else do i need to do to have my type behave like a real record ?
Is it possible to implement a ProvidedRecord with this approach?
The text was updated successfully, but these errors were encountered: