BrowserREPL-button-tip-on BrowserREPL-button-tip-off

EditButtonTip 2019-08-04

class X::Syntax::Augment::WithoutMonkeyTyping

<p>Compilation error due to augmenting a type without the <span class="code">MONKEY-TYPING</span> pragma </p>

class X::Syntax::Augment::WithoutMonkeyTyping does X::Syntax { }
Code

Compile time error thrown when augment is used without use MONKEY-TYPING.

Since augment is considered a rather unsafe and impolite action, you have to pre-declare your intent with the use MONKEY-TYPING; pragma.

If you don't do that, like here

augment class Int { };
Code

you get the error

===SORRY!===
augment not allowed without 'use MONKEY-TYPING'
Code