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

Add stream construct #21046

Merged
merged 4 commits into from
Feb 14, 2020
Merged

Conversation

grainier
Copy link
Contributor

Purpose

$title

Fixes #20745

Approach

n/a

Samples

int i = 0;

stream<int> evenNumberStream = stream {
    i += 2;
    return { value: i };
};

var evenNumberRec = evenNumberStream.next();
int evenNumber = <int>evenNumberRec["value"];

Remarks

#20745
ballerina-platform/ballerina-spec#406

Check List

  • Read the Contributing Guide
  • Updated Change Log
  • Checked Tooling Support (#)
  • Added necessary tests
    • Unit Tests
    • Spec Conformance Tests
    • Integration Tests
    • Ballerina By Example Tests
  • Increased Test Coverage
  • Added necessary documentation
    • API documentation
    • Module documentation in Module.md files
    • Ballerina By Examples

@grainier grainier added Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Lang/Streams Type `stream` and its implementation related issues labels Feb 13, 2020
@grainier grainier added this to the Ballerina 1.2.0 milestone Feb 13, 2020
@mohanvive mohanvive merged commit 8364d05 into ballerina-platform:master Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lang/Streams Type `stream` and its implementation related issues Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Streaming Constructor Implementation
3 participants