Skip to content

ICE: encode_symbol: id not found #2766

Closed

Description

@eholk

This code snippet gets an internal compiler error when encoding metadata. It should probably be rejected earlier on, since the innermost recv function doesn't have type parameters. Adding <T: send> to the inner function makes it compile successfully.

mod stream {
    enum stream<T: send> { send(T, server::stream<T>), }
    mod server {
        impl recv<T: send> for stream<T> {
            fn recv() -> extern fn(+stream<T>) -> stream::stream<T> {
                fn recv(+pipe: stream<T>) -> stream::stream<T> {
                    option::unwrap(pipes::recv(pipe))
                }
                recv
            }
        }
        type stream<T: send> = pipes::recv_packet<stream::stream<T>>;
    }
}

Activity

  1. catamorphism commented on Jul 1, 2012

    @catamorphism
    Contributor

    I'll take a look.

  2. catamorphism commented on Jul 10, 2012

    @catamorphism
    Contributor

    resolve3 fixes this. I'll check in a test case.

  3. catamorphism commented on Jul 10, 2012

    @catamorphism
    Contributor

    Added the test case: 78088fb

  4. added a commit that references this issue on Feb 26, 2023
  5. added a commit that references this issue on Feb 11, 2026
  6. added a commit that references this issue on Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesA-type-systemArea: Type systemI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions