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

[lua] String.split null-safety error #10136

Closed
RblSb opened this issue Feb 22, 2021 · 4 comments · Fixed by #11057
Closed

[lua] String.split null-safety error #10136

RblSb opened this issue Feb 22, 2021 · 4 comments · Fixed by #11057
Labels
feature-null-safety Null safety platform-lua Everything related to Lua
Milestone

Comments

@RblSb
Copy link
Member

RblSb commented Feb 22, 2021

@:nullSafety(Strict)
function main() {
	"path".split("."); // Null safety: Cannot assign nullable value here.
}

split is kind of fat and inlined (probably bad?) and no any error inside of method. Works fine without inline.

@RealyUniqueName
Copy link
Member

What target?

@Simn Simn added the platform-lua Everything related to Lua label Feb 22, 2021
@RblSb
Copy link
Member Author

RblSb commented Feb 23, 2021

Fixed in #10081, but seems like _std methods are not checked by NullSafety, except when they are inline, so errors showed only on call-site for such case. Not big deal for current time.

@jdonaldson
Copy link
Member

Yeah, let me try de-inlining some of the std String methods. That's too much code to generate.

@RealyUniqueName RealyUniqueName added this to the Backlog milestone Mar 17, 2021
@danielo515
Copy link
Contributor

What is the status of this?

@Simn Simn modified the milestones: Backlog, Later Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-null-safety Null safety platform-lua Everything related to Lua
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants