HaxeFoundation / HaxeFoundation/hxcpp
error: non-void function 'handle' should return a value [-Wreturn-mismatch]
- Dominant language
- C++
- Stars
- 330
- Forks
- 227
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 18
Description
I noticed a bug in hxcpp code generation.
### Code
```haxe
package;
class Test {
static function main() {
trace(new TestHandler());
}
}
class TestHandler extends AbstractHandler {
public function handle():Void {
var keys = [];
if (keys.length == 0) {
return;
}
}
}
abstract class AbstractHandler {
public function new() {}
public abstract function handle():T;
}
```
### Exception
```ex
Error: ./src/TestHandler.cpp:40:15: error: non-void function 'handle' should return a value [-Wreturn-mismatch]
40 | HXDLIN( 13) return;
| ^
1 error generated
```
### Environment
hxcpp 4.3.96
haxe 4.3.6
MacOS
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.