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

(many) Add explicitly typed int[] arrays #496

Merged
merged 1 commit into from
Jul 27, 2024

Conversation

perlun
Copy link
Collaborator

@perlun perlun commented Jun 18, 2024

Building on top of #494, but making it possible to declare these explicitly too.

@perlun perlun added the language Language features (or bugs) label Jun 18, 2024
break;

case "string" or "String":
// Perlang String is NOT the same as the .NET String class.
typeReference.SetClrType(typeof(Lang.String));
typeReference.SetClrType(typeReference.IsArray ? typeof(Lang.String[]) : typeof(Lang.String));
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above adds support for many more array types than just int[], but only int[] (implicit and explicit) is supported right now. We'll add int[] and string[] as the two first ones, and the next ones will perhaps go into the next milestone.


result.OutputAsString.Should()
.Contain("index out of range (3 > 2)");
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@perlun perlun force-pushed the feature/implement-perlang-arrays branch 2 times, most recently from db72def to cd66d05 Compare July 27, 2024 19:43
@perlun perlun enabled auto-merge (squash) July 27, 2024 19:43
@perlun perlun force-pushed the feature/implement-perlang-arrays branch from cd66d05 to a312f25 Compare July 27, 2024 20:06
@perlun perlun mentioned this pull request Jul 27, 2024
@perlun perlun merged commit 9fced55 into master Jul 27, 2024
11 checks passed
@perlun perlun deleted the feature/implement-perlang-arrays branch July 27, 2024 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language Language features (or bugs)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant