
Is using define-local-member-name
supposed to interact with your init list in Racket Classes?, such as in this example: https://gist.github.com/LeifAndersen/05c46b068249b0d7312b635e993327b0


This error also persists if you replace the init-field
line with: (init [(internal-hello hello)])
(field [hello internal-hello])
Which is really odd to me.

Hmm…looking at the fully expanded macro, I’m inclined to think this is possibly a bug in extract-arg
or validate-local-member

@leif from the docs for define-local-member-name
: “Thus, methods, fields, and initialization arguments declared with such external-name ids are accessible only in the scope of the define-local-member-name declaration.”

@ryanc Bleh, thanks, I missed that.

In that case, is there any way I can have the external name for an init variable be the same as a private field?

(Or rather, private in that instances of a class can access it for any object, like you would do in a copy method.)