Skip to content

Shadowing? #1

@stephen-smith

Description

@stephen-smith

I'm not sure if this is intentional or not, but fields can shadow each other AND you can actually access either value if they have different types. I'm not sure if this is on purpose or not:

shadowy : Record [("nil", Int), ("nil", String)]
shadowy = [ "nil" := 0, "nil" := "" ]

underneath : String
underneath = shadowy . "nil"

on_top : Int
on_top = shadowy . "nil"

That defines underneath to be the String "" and on_top to be the Int 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions