Skip to content

Implicit cast in pattern matching switch. #9430

Discussion options

You must be logged in to vote
var newnode = statement switch
  {
      JuliaParser.ScopeStatementContext stmt => CreateScopeStatement(stmt),
      JuliaParser.StructStatementContext stmt => CreateStructStatement(stmt),
      JuliaParser.Proc_statementContext stmt => CreateProcedureStatement(stmt),
      _ => new AstNode()
  };

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@The-Futurist
Comment options

Answer selected by The-Futurist
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants