Skip to content

Commit

Permalink
Merge pull request #118 from vladimirvelikov/patch-1
Browse files Browse the repository at this point in the history
No default constructors for extending classes
  • Loading branch information
haxiomic committed Jul 17, 2022
2 parents 4f6a7da + e783778 commit 44fde39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ConverterContext.hx
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ class ConverterContext {

if (classDeclaration != null) {
// add default constructor
if (!fields.exists(f -> f.name == 'new')) {
if (!fields.exists(f -> f.name == 'new') && classSuperType == null) {
fields.unshift((macro class { function new(); }).fields[0]);
}
}
Expand Down Expand Up @@ -2112,4 +2112,4 @@ class ConverterContext {
**TypeChecker**
- `getAugmentedPropertiesOfType(declaredType)`, all properties but also includes `bind`, `apply` etc (don't use)
- `getApparentType()` can create transient types. Transient types can lead to infinite loop type conversions because we cannot match a transient type against another. Avoid using
**/
**/

0 comments on commit 44fde39

Please sign in to comment.