using System.Console; | |
[Record] class A { public Foo : B { get; } } | |
[Record] class B { public Bar : int { get; } } | |
module Program | |
{ | |
Main() : void | |
{ | |
def obj1 : object = A(B(42)); | |
match (obj1) | |
{ | |
| A(Foo=B(Bar=bar)) => WriteLine($"Bar=$bar"); | |
| _ => WriteLine("Ops!"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment