Created
February 7, 2011 16:43
-
-
Save lyricallogical/814689 to your computer and use it in GitHub Desktop.
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
module A | |
export type Base | |
export val global.f : Base -> Base -> Ret # vtbl 作りたいけど、作れない | |
module B | |
export type X can cast from Base | |
export val global.f : X -> Base -> Ret | |
module C | |
export type Y can cast from Base | |
export val global.f : Base -> Y -> Ret | |
module D | |
import B, C | |
call global.f x, y # conflict!!! | |
------------------ | |
module A | |
export abstract type Base | |
export virtual method global.f : Base -> Ret # vtbl 作りたいけど、作れない | |
module B | |
export type X <: Base | |
export virtual method global.f : X -> Ret | |
module C | |
export type Y <: Base | |
export virtual method global.f : Y -> Ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment