Disable polymorphic overloading in the global scope

TODO: Figure out why it does not work in the global scope
This commit is contained in:
Ginger Bill
2017-07-02 22:08:39 +01:00
parent 96d32680fe
commit bc16b290ba
12 changed files with 276 additions and 222 deletions
+13 -2
View File
@@ -364,9 +364,17 @@ explicit_parametric_polymorphic_procedures :: proc() {
}
}
main :: proc() {
general_stuff();
foo :: proc(x: i64, y: f32) do fmt.println("#1", x, y);
foo :: proc(x: type, y: f32) do fmt.println("#2", type_info(x), y);
foo :: proc(x: type) do fmt.println("#3", type_info(x));
foo(y = 3785.1546, x = 123);
foo(x = int, y = 897.513);
foo(x = f32);
/*
general_stuff();
foreign_blocks();
default_arguments();
named_arguments();
@@ -376,7 +384,6 @@ main :: proc() {
// Command line argument(s)!
// -opt=0,1,2,3
*/
program := "+ + * - /";
accumulator := 0;
@@ -393,5 +400,9 @@ main :: proc() {
fmt.printf("The program \"%s\" calculates the value %d\n",
program, accumulator);
*/
}