From c8846c90c8553a3c4432859b0da491f7863b9d33 Mon Sep 17 00:00:00 2001 From: sebthom Date: Sun, 7 May 2023 17:55:35 +0200 Subject: [PATCH] support Haxe 4.3 --- .github/workflows/build.yml | 1 + CHANGELOG.md | 4 ++++ src/hx/sshclient/SSHClient.hx | 5 ++++- 3 files changed, 9 insertions(+), 1 deletion(-) 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!";