jckarter / clay

The Clay programming language
http://claylabs.com/clay
Other
404 stars 34 forks source link

Basic check overload is compatible with define during loading #422

Closed stepancheg closed 12 years ago

stepancheg commented 12 years ago
define foo(a);
overload foo(a, b) = 1;

is error now even if foo is not called.

jckarter commented 12 years ago

Thanks. Looks good now.

ghost commented 12 years ago

Linux test failures:

[lang/overloads/declmismatch/param/1-2]
Failure: compiler did not fail
Expected:
 overload has more parameters \(2\) than declaration \(1\)

[lang/overloads/declmismatch/param/1-2v]
Failure: compiler did not fail
Expected:
 overload has more parameters \(2\+\) than declaration \(1\)

[lang/overloads/declmismatch/param/2-0]
Failure: compiler did not fail
Expected:
 overload has fewer parameters \(0\) than declaration \(2\)

[lang/overloads/declmismatch/param/2v-0]
Failure: compiler did not fail
Expected:
 overload has fewer parameters \(0\) than declaration \(2\+\)

[lang/overloads/declmismatch/return/1-2]
Failure: compiler did not fail
Expected:
 overload return count \(2\) must be equal to define return count \(1\)

[lang/overloads/declmismatch/return/2-0]
Failure: compiler did not fail
Expected:
 overload return count \(0\) must be equal to define return count \(2\)

[lang/overloads/standalone]
Failure: compiler did not fail
Expected:
 standalone functions cannot be overloaded
stepancheg commented 12 years ago

I'll look into it tonight.

jckarter commented 12 years ago

I think @agemogolk is running tests against an out-of-date compiler.

ghost commented 12 years ago

Yep, build dir mix up. Scratch those test failures.