-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
Aria 1.0 RoadmapAria 1.5 RoadmapenhancementNew feature or requestNew feature or requestperformancePull requests that relate to performance issuesPull requests that relate to performance issues
Description
In most cases, the compiler will see Foo::Bar and need to tell Foo - hey make me an instance of "Bar", no I don't know it's ID, imagine:
enum A { case Bar, Case Baq }
enum B { case Foo, case Bar }
func foo(n: Int) {
val Foo = (n == 2) ? A : B;
return Foo::Bar;
}
foo(Int.parse(readln(""))); # or something like that
But for some well-known enums, e.g. Unit::unit, RuntimeError::OperationFailed("") and so on, the cases are ordered and well defined. Consider allowing passing an int const instead of a string const
Metadata
Metadata
Assignees
Labels
Aria 1.0 RoadmapAria 1.5 RoadmapenhancementNew feature or requestNew feature or requestperformancePull requests that relate to performance issuesPull requests that relate to performance issues