Add operator overload tests

This commit is contained in:
Jason Turner 2015-10-01 09:39:03 -06:00
parent 3a8cb581cc
commit d9fa5605ac
2 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,7 @@
def string::`/=`(double d) { this = "${this}/=${d}"; return this; }
var s = "Hello World"
s /= 2

View File

@ -0,0 +1,6 @@
def string::`*`(double d) { return "${this} * ${d}"; }
"Hello World" * 2