mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-23 06:05:00 -07:00
Disable polymorphic overloading in the global scope
TODO: Figure out why it does not work in the global scope
This commit is contained in:
+13
-2
@@ -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);
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user