You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 1552 Reporter: administrator Status: closed Resolution: not a bug Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Hello, I was using 'as' patterns and found behavior that seemed strange.
--
let ((a,b) as x ,(c,d) as y) as z = ((1,2),(3,4))
in
((a,b,c,d),(x,y,z));;
I'd expect x == (a,b) and y == (c,d), but I don't get that, I get
y == ((a,b),(c,d))
Invoke this and see what I mean:
let ((a,b) as x ,(c,d) as y) as z = ((1,2),(3,4))
in
y;;
: (int * int) * (int * int) = (1, 2), (3, 4)
--
Shouldn't it give me (3,4)?
However, if I insert an extra set of paremthesis, it works:
let ((a,b) as x ,((c,d) as y)) as z = ((1,2),(3,4))
in
y;;
: int * int = 3, 4
--
So is this a bug?
Scott
The text was updated successfully, but these errors were encountered:
Original bug ID: 1552
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Hello, I was using 'as' patterns and found behavior that seemed strange.
--
let ((a,b) as x ,(c,d) as y) as z = ((1,2),(3,4))
in
((a,b,c,d),(x,y,z));;
I'd expect x == (a,b) and y == (c,d), but I don't get that, I get
y == ((a,b),(c,d))
Invoke this and see what I mean:
let ((a,b) as x ,(c,d) as y) as z = ((1,2),(3,4))
in
y;;
--
Shouldn't it give me (3,4)?
However, if I insert an extra set of paremthesis, it works:
let ((a,b) as x ,((c,d) as y)) as z = ((1,2),(3,4))
in
y;;
--
So is this a bug?
Scott
The text was updated successfully, but these errors were encountered: