3 ms·
Incorrect. To quote the page you've linked: "For the most part, this type is identical to Expr, but it allows constraining the type of accepted expressions." or
by b2d 7y ago
Incorrect. To quote the page you've linked: "For the most part, this type is identical to Expr, but it allows constraining the type of accepted expressions." or otherwise put: ExprOf only affects macro arguments, not return value. What you want is this:
class StringGetter {
public static macro function getString() {
var s:String = "";
return macro ($v{s} : Int);
}
}