Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: class ... { static ...} #4

Open
zaoqi opened this issue May 24, 2019 · 2 comments
Open

feature request: class ... { static ...} #4

zaoqi opened this issue May 24, 2019 · 2 comments

Comments

@zaoqi
Copy link

zaoqi commented May 24, 2019

No description provided.

@aschoerk
Copy link
Owner

what do you mean?

check:

class A {
static int X = 100;
int x = 200;

static int s(int i, int j) {
return i + j;
}

int add(int i, int j) {
return i + j;
}
}

becomes:

const X: i32 = 100;
struct A {

 let x: i32 = 200;

}

impl A {

fn  s( i: i32,  j: i32) -> i32  {
    return i + j;
}

fn  add(&self,  i: i32,  j: i32) -> i32  {
    return i + j;
}

}

@zaoqi
Copy link
Author

zaoqi commented May 31, 2019

class A{
static {
...
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants