-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
bugSomething isn't workingSomething isn't workingsemaSemantic Analysis — includes Constraint System, Scope resolution, and Semantic PassesSemantic Analysis — includes Constraint System, Scope resolution, and Semantic Passes
Description
When overloading a variable, no error is produced, and the used variable is always set to the last. However, the constraint system is solved with all overloads, so if it is found unambiguous with the first choice, it crashes as GILGen then uses the last choice.
func consume(@unused value: Int) {}
func main() {
let x = 42;
let x = "Hello";
consume(x);
}
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingsemaSemantic Analysis — includes Constraint System, Scope resolution, and Semantic PassesSemantic Analysis — includes Constraint System, Scope resolution, and Semantic Passes
Type
Projects
Status
Discussion