Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
symbolToString
package metaobjectTest
@doc{*
Annotation 'symbolToString' takes a single parameter and produces
a string whose contents is the parameter. Then the annotation is
an expression of type String.
This annotation is used mainly in generic prototypes to convert
a generic parameter to a string.
*}
object SymbolToString
func run {
var String aa = @symbolToString(SymbolToString);
assert aa == "SymbolToString";
aa = @symbolToString("Int");
assert aa == "Int";
aa = @symbolToString(T);
assert aa == "T";
}
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.