-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lax compiler causes problem with Result[]
object encapsulating base of inherited object
#1796
Labels
Comments
mjfh
added a commit
that referenced
this issue
Oct 2, 2023
details: This does not affect the legacy interface which is the production one, currently.
mjfh
added a commit
that referenced
this issue
Oct 2, 2023
This is what the language works like (ie it has got nothing to do with type
AObj = object of RootObj
BObj = object of AObj
var x: AObj
x = BObj() # Raises ObjectAssignmentDefect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following program compiles and runs ok.
The problem is that the
Result[]
clause does not work properly when encapsulating the base objectAObj
while given some inherited objectBObj
. But the compiler accepts that construction as valid.The text was updated successfully, but these errors were encountered: