Skip to content

One method calling another crashes rustboot #114

Closed
@jyasskin

Description

@jyasskin

Given:

obj oT() {
  fn get() -> int {
    ret 3;
  }
  fn foo() {
    auto c = get();
  }
}
fn main() {
}

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions