Skip to content

ICE: encode_symbol: id not found #2766

Closed
@eholk

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>>;
    }
}

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