@needle-tools/needle-component-compiler 3.0.14 → 3.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Changelog.md +4 -0
- package/dist/impl/csharp-compiler.js +2 -1
- package/package.json +1 -1
package/Changelog.md
CHANGED
|
@@ -4,6 +4,10 @@ All notable changes to this package will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [3.0.15] - 2026-03-23
|
|
8
|
+
### Fixed
|
|
9
|
+
- Fix non-void method stubs producing uncompilable C# (`CS0161: not all code paths return a value`) by emitting `{ return default; }` instead of `{}`
|
|
10
|
+
|
|
7
11
|
## [3.0.14] - 2026-03-23
|
|
8
12
|
### Fixed
|
|
9
13
|
- Fix `@type` override on array fields producing double array suffix (e.g. `Type[][]` instead of `Type[]`)
|
|
@@ -342,7 +342,8 @@ var CSharpWriter = /** @class */ (function (_super) {
|
|
|
342
342
|
var csReturnType = returnTypeOverride !== null && returnTypeOverride !== void 0 ? returnTypeOverride : (returnType ? ((_b = this.resolveKnownCSharpTypeName(returnType)) !== null && _b !== void 0 ? _b : "void") : "void");
|
|
343
343
|
if (contextMenu)
|
|
344
344
|
this.writer.writeLine("[UnityEngine.ContextMenu(\"".concat(contextMenu, "\")]"));
|
|
345
|
-
|
|
345
|
+
var body = csReturnType !== "void" ? "{ return default; }" : "{}";
|
|
346
|
+
this.writer.writeLine("public ".concat(csReturnType, " ").concat(methodName, "(").concat(paramList, ") ").concat(body));
|
|
346
347
|
};
|
|
347
348
|
CSharpWriter.prototype.writeNewTypeExpression = function (typeName, args) {
|
|
348
349
|
// no-op for C# output
|