Skip to content

ICE on explicit generic proc with dependent-typed argument #7008

@RedBeard0531

Description

@RedBeard0531
type Node[T] = object
    val: T

# Compiles fine
proc concreteProc(s: Node[cstring]; key: s.T) = discard

# Also fine
proc implicitGenericProc1(s: Node; key: s.T) = discard

# still fine
proc explicitGenericProc1[T](s: Node[T]; key: T) = discard
    
# Internal Compiler Error!
proc explicitGenericProc2[T](s: Node[T]; key: s.T) = discard
Error: internal error: cannot resolve type: Node[explicitGenericProc2.T]

Repros on 0.17.2 and devel

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions