diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2624322..ea121be 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,6 +67,7 @@ jobs: - windows-latest haxe: - nightly + - 4.3.1 - 4.2.5 steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 7dc9f77..73e0e47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed +- "Null safety: Cannot pass nullable value to not-nullable argument" with Haxe 4.3 + + ## [0.1.0] - 2023-02-17 ### Added diff --git a/src/hx/sshclient/SSHClient.hx b/src/hx/sshclient/SSHClient.hx index f9b4f62..78409c2 100644 --- a/src/hx/sshclient/SSHClient.hx +++ b/src/hx/sshclient/SSHClient.hx @@ -34,13 +34,15 @@ abstract class SSHClient { public var compression(default, null):Bool = false; - function new() { + inline function new() { } + public abstract function execute(cmd:String):BackgroundProcess; public function toString():String { + @:nullSafety(Off) return '${Type.getClassName(Type.getClass(this))}[${username}@${hostname}:${port},Secret(${secret.getName()})]'; } } @@ -58,6 +60,7 @@ class SSHClientBuilder> { inline function new() { } + public function build():T { if (clientBuilt) throw "Already built!";