-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #249 from vein-lang/fixes/generic-adaptation
Generic behaviour adaptations
- Loading branch information
Showing
20 changed files
with
340 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,10 @@ | ||
#space "std" | ||
|
||
|
||
public static class Out | ||
{ | ||
[native("__internal__", "@_println")] | ||
public extern static @_println(value: Object): Void; | ||
[native("__internal__", "@_println")] | ||
public extern static @_println(value: i32): Void; | ||
|
||
public static print(value: string): Void | ||
|> Out.@_println(value); | ||
|
||
public static print(value: i32): Void | ||
|> Out.@_println(value); | ||
} | ||
public extern static _println(value: Object): Void; | ||
|
||
public static print<Any>(value: Any): Void | ||
|> Out._println(value); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,31 @@ | ||
#space "std" | ||
|
||
|
||
public class Testable | ||
{ | ||
public static master(): Void | ||
{ | ||
Out.print("yamete..."); | ||
|
||
|
||
aboba(1, "test string"); | ||
|
||
abobus(delMethod); | ||
} | ||
|
||
|
||
public static delMethod(i: i32): Void { | ||
Out.print("yamete..."); | ||
} | ||
|
||
public static aboba<T, E>(t: T, b: E): Void { | ||
Out.print("yamete..."); | ||
Out.print(t); | ||
Out.print(b); | ||
} | ||
} | ||
|
||
public static abobus(fn: testMethod): Void { | ||
fn(255); | ||
} | ||
} | ||
|
||
global alias testMethod(i: i32): Void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.