Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package metaobjectTest
@doc{*
Annotation 'letter' should be attached to a Char in a variable
declaration. It checks whether a value assigned to the
variable is a letter.
*}
object Letter
func run {
var Char@letter ch;
ch = 'a'; // ok
var Char other = '#';
var ok = false;
{
ch = other; // runtime error
} catch: { (: CyException e :)
ok = true
};
assert ok;
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.