shhyou / ypsilon-fork

Automatically exported from code.google.com/p/ypsilon
Other
0 stars 0 forks source link

enum-set-union doesn't work ("expected same type enum-sets") #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
$ ypsilon
Ypsilon 0.9.6-update2 Copyright (c) 2008 Y.Fujita, LittleWing Company Limited.
> (define-enumeration prefix
    (operand address cs ds es fs gs ss lock repz repnz rex rex.w rex.r
             rex.x rex.b vex vex.l drex drex.oc0)
    prefix-set)
> (enum-set-union (prefix-set) (prefix-set))

error in enum-set-union: expected same type enum-sets

irritants:
  #<enum-set ()>
  #<enum-set ()>

backtrace:
  0  (enum-set-union ((enum-set-constructor (make-enumeration '(operand
address cs ...) ...) ...) ...) ...) ...)
  ..."/dev/stdin" line 1

The enum-sets are of the same type, so I think this should work. 

Original issue reported on code.google.com by weinh...@gmail.com on 18 Nov 2008 at 10:25

GoogleCodeExporter commented 9 years ago
Thank you for your bug report!
-- fujita

Original comment by y.fujita...@gmail.com on 19 Nov 2008 at 12:48

GoogleCodeExporter commented 9 years ago
I found the bug in 'define-enumeration'.
I have fixed it and trunk directory updated to revision 274.
Please try. Thank you!

$ ypsilon
Ypsilon 0.9.6-trunk/r274 Copyright (c) 2008 Y.Fujita, LittleWing Company 
Limited.
> (define-enumeration prefix
    (operand address cs ds es fs gs ss lock repz repnz rex rex.w rex.r
             rex.x rex.b vex vex.l drex drex.oc0)
    prefix-set)
> (enum-set-union (prefix-set) (prefix-set))
#<enum-set ()>
> (enum-set-union (prefix-set cs ds) (prefix-set ds gs))
#<enum-set (cs ds gs)>
>

Original comment by y.fujita...@gmail.com on 20 Nov 2008 at 1:22

GoogleCodeExporter commented 9 years ago
Yes, it works. Thank you very much!

Original comment by weinh...@gmail.com on 20 Nov 2008 at 3:16