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

support calling template function with typeargs #845

Closed
wants to merge 3 commits into from

Conversation

horasal
Copy link
Contributor

@horasal horasal commented Oct 17, 2014

the follow code can not be compiled:(segmentation fault)

foo: func<T>(i: T) {
    // do something
}

foo<Int>(1)

It turns out that there's no code handling typeargs in nagaqueen(grammer).
This patch just make this compilable but many thing left to be done, such as typearg check and better resolve based on type information.

Currently, typeargs are just added to argumentTypes. Real type is still inferred from argument type.

See also:
ooc-lang/nagaqueen#26

@horasal
Copy link
Contributor Author

horasal commented Oct 17, 2014

Sorry, I just found #811

@horasal horasal closed this Oct 17, 2014
@horasal horasal deleted the template_function_call branch October 17, 2014 03:30
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

Successfully merging this pull request may close these issues.

None yet

1 participant