Skip to content

relative-dir requires careful evaluation #3

Description

@calebzulawski

This function works:

fn ~(Path:or-source :source) :args -> {
    Path :relative-dir = Path:parent $source
    c++:module ^{relative-dir} { ... }
}

however this function doesn't:

fn ~(Path:or-source :source) :args -> {
    relative-dir = Path:parent $source
    c++:module ^{relative-dir} { ... }
}

I haven't quite tracked down what "doesn't work" means--there is no ergo error, but the module paths are somehow evaluated differently (and result in compiler errors, specifically missing #includes). Also, I guess this is maybe a bug in ergo and not ergo-cpp...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions