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
whentrue:
type A =objectofRootObj
x: inttype B =objectof A
y: intprocfn1(a: var A) =echo (a,) # bug: ObjectAssignmentDefectprocfn2(a: A) =echo a.x # okecho$a # okecho ($a,) # okecho (a,) # BUGprocmain=var b =B(x: 3, y:4)
fn2(b) # crash in RT, no crash in VM# fn1(b) # dittomain()
static: main()
that behavior should be that it works
(similar code works in C++)
even if it wasn't supposed to work, it should give CT error, not RT crash
Example 2
whentrue:
type A =objectofRootObj
x: inttype B =objectof A
y: intprocmain=var b: B
var a: A
a = b # VM or js: no crash, RT: ObjectAssignmentDefectstatic: main()
main()
Example 1
Current Output
Expected Output
(similar code works in C++)
Example 2
same behavior as Example 1
Additional Information
1.5.1 fe9a37f
links
genericAssignAux
runtime error #16706method
similar code works in C++
The text was updated successfully, but these errors were encountered: