Sealed classes and methods: Difference between revisions
m
→{{header|Wren}}: Changed to Wren S/H
(Update C++ entry) |
m (→{{header|Wren}}: Changed to Wren S/H) |
||
Line 383:
3. Using the 'is' operator (i.e. a ''is'' C) to detect the type of 'a' wouldn't work here as this would return 'true' if 'a' were either a 'C' object or an object of a subclass of 'C'. It is possible to spoof the 'is' operator by overriding its normal behavior, though this is definitely not recommended!
<syntaxhighlight lang="
construct new(name, age) {
_name = name
|