[math] check that overriding operators fails

This commit is contained in:
ben 2016-03-12 12:44:43 -05:00
parent 8687fb3481
commit f8928affc2

View File

@ -24,4 +24,10 @@
;; -- dividing by zero => caught statically
(/: 1 1 0)
(/: 1 1 (+: 4 -2 -2))
;; -- redefine ops => fail
(ann (let ([+: (lambda (x y) "hello")]) (+: 1 1)) Integer)
(ann (let ([-: (lambda (x y) "hello")]) (-: 1 1)) Integer)
(ann (let ([/: (lambda (x y) "hello")]) (/: 1 1)) Integer)
(ann (let ([*: (lambda (x y) "hello")]) (*: 1 1)) Integer)
(ann (let ([expt: (lambda (x y) "hello")]) (expt: 1 1)) Integer)
))