-
Notifications
You must be signed in to change notification settings - Fork 13.3k
One method calling another crashes rustboot #114
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Bug in the new typechecker and/or resolver; I'll fix that part. It should trap earlier. However, this is also a language non-feature (at present). Currently there's no mechanism for self-dispatch inside an object, either implicitly as you're doing, or via this.get(). There's no 'this' binding at all. It's not a ton of work to add, I've been hesitant to see if (a) it's necessary and (b) it will interact with whatever mechanism gets adopted for ad-hoc object extension / method replacement, which we haven't settled on yet. And I was also curious to see how far we could get without the feature. In general I only wish to adopt OO features "one at a time" as seems necessary, and stick to the minimum. The "class" concept in many OO languages is the semantic dumping ground of every language feature ever, and I don't want to wind up in that boat. |
Ah, didn't realize that. I've documented this restriction in jyasskin/rust@6e967f4. Not having it doesn't seem like the end of the world to me, and that'll certainly simplify the specification of method overriding. |
Fix over-optimistic resolution of self-methods within obj scopes. There is no such feature in the language at present. Add test to prevent regression. Closed by f1db420. |
…re is no such feature in the language at present. Add test to prevent regression. Closes rust-lang#114.
Correct spelling of `where` keyword
Add set_alignment and get_alignment on InstructionValue.
Sync from rust 028c6f1
## Towards: Issue rust-lang#59 ### Parent branch: main --- ### Changes - Added macros for generating `carrying_mul` harnesses - Added harnesses for `carrying_mul` for the following integer types: - `u8`, `u16`, `u32`, `u64` --------- Co-authored-by: yew005 <yew005@ucsd.edu> Co-authored-by: MWDZ <jinjunfeng721@gmail.com> Co-authored-by: Yenyun035 <yenyunw@andrew.cmu.edu> Co-authored-by: Rajath <rajathkotyal@gmail.com> Co-authored-by: Rajath Kotyal <53811196+rajathkotyal@users.noreply.github.com>
Given:
Rustboot crashes with:
Fatal error: exception Failure("internal_check_base_lval: unexpected defn type")
Raised at file "pervasives.ml", line 22, characters 22-33
Called from file "boot/me/type.ml", line 280, characters 15-77
Called from file "boot/me/type.ml", line 461, characters 17-47
Called from file "boot/me/type.ml", line 492, characters 6-64
Called from file "boot/me/type.ml", line 598, characters 20-37
Called from file "boot/me/type.ml", line 715, characters 23-45
Called from file "boot/me/type.ml", line 820, characters 8-23
Re-raised at file "boot/me/type.ml", line 633, characters 6-189
Called from file "boot/me/type.ml", line 926, characters 8-51
Called from file "boot/me/walk.ml", line 134, characters 4-9
Called from file "array.ml", line 117, characters 31-48
Called from file "boot/me/walk.ml", line 135, characters 4-15
Called from file "boot/me/walk.ml", line 320, characters 2-23
Called from file "hashtbl.ml", line 145, characters 8-13
Called from file "hashtbl.ml", line 148, characters 4-19
Called from file "boot/me/walk.ml", line 186, characters 12-59
Called from file "boot/me/walk.ml", line 135, characters 4-15
Called from file "hashtbl.ml", line 145, characters 8-13
Called from file "hashtbl.ml", line 148, characters 4-19
Called from file "boot/me/walk.ml", line 135, characters 4-15
Called from file "boot/me/type.ml", line 955, characters 4-231
Re-raised at file "boot/me/type.ml", line 35, characters 4-112
Called from file "boot/driver/main.ml", line 322, characters 9-26
Called from file "array.ml", line 117, characters 31-48
Called from file "boot/driver/main.ml", line 320, characters 4-366
Called from file "boot/driver/main.ml", line 404, characters 5-21
The crash goes away if foo() calls a global function, and I get an appropriate error message if the function is just misspelled.
The text was updated successfully, but these errors were encountered: