mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Improve ordering of method registration to support adding methods to generic modules with method constraints #1746
This commit is contained in:
19
test/test_suite/methods/extension_method_check.c3
Normal file
19
test/test_suite/methods/extension_method_check.c3
Normal file
@@ -0,0 +1,19 @@
|
||||
module test;
|
||||
|
||||
def Bob = Test(<any>);
|
||||
fn void Bob.crash(&self) {}
|
||||
|
||||
fn int main()
|
||||
{
|
||||
Test(<any>) foo;
|
||||
return 0;
|
||||
}
|
||||
<*
|
||||
@require $defined(String.hash)
|
||||
*>
|
||||
module test::generic(<Some_Type>);
|
||||
|
||||
enum Test
|
||||
{
|
||||
ABC
|
||||
}
|
||||
Reference in New Issue
Block a user