Skip to content

Compilation fails when using fusion's 'Some' inside a generic proc #20435

@jmgomez

Description

@jmgomez

What happened?

The following code will fail to compile due to willFail being generic

import std/options import fusion/matching proc works() = let a = some 2 case a:  of Some(@t): echo "some"  of None(): echo "none" proc willFail[T]() = let b = some 2 case b:  of Some(@t): echo "some"  of None(): echo "none" 

Nim Version

Nim Compiler Version 1.7.1 [MacOSX: amd64] Compiled at 2022-09-13 Copyright (c) 2006-2022 by Andreas Rumpf 

Current Standard Output Logs

Error: undeclared identifier: 'Some' 
 ### Expected Standard Output Logs ```shell [SuccessX] 
 ### Possible Solution _No response_ ### Additional Information _No response_ 

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