Scope modifiers: Difference between revisions

m
m (→‎{{header|Wren}}: Minor tidy)
Line 1,795:
 
In the following example, the attempt to access the private field is picked up at compile time (Wren has a single-pass 'bytecode' compiler) and so the penultimate line, although OK, doesn't print.
<syntaxhighlight lang="ecmascriptwren">class MyClass {
construct new(a) {
_a = a // creates an instance field _a automatically
Line 1,808:
{{out}}
<pre>
$ wren scope_modifiersScope_modifiers.wren
[./scope_modifiersScope_modifiers line 10] Error at '_a': Expect method name after '.'.
</pre>
 
9,490

edits