|
136 | 136 | // TODO: superclass inheritance for JAXB XmlAccessorType |
137 | 137 | // TODO: Transpiler bug allows static String name, but JavaScript function().name is read-only and will be "clazz" |
138 | 138 |
|
| 139 | +//BH 2023.03.29 -- 3.3.1-v7 fixes outer static method call from within lambda expression. |
| 140 | +//BH 2023.02.09 -- 3.3.1.v6 fixes j2s.excluded.paths needing /src/xxxx |
| 141 | +//BH 2022.06.27 -- 3.3.1-v5 fixes missing method annotations |
139 | 142 | //BH 2022.01.17 -- 3.3.1-v4 fixes default interface methods referencing their own static fields |
140 | 143 | //BH 2021.01.14 -- 3.3.1-v3 fixes missing finals for nested () -> {...} |
141 | 144 | //BH 2021.01.03 -- 3.3.1-v2 adds @j2sAsync adds async for function - experimental |
@@ -1578,11 +1581,15 @@ private boolean addMethodInvocation(SimpleName javaQualifier, List<?> arguments, |
1578 | 1581 | String privateVar = (isPrivateAndNotStatic ? getPrivateVar(declaringClass, false) : null); |
1579 | 1582 | boolean doLogMethodCalled = (!isPrivate && global_htMethodsCalled != null); |
1580 | 1583 | boolean needBname = ( |
1581 | | - |
1582 | | - !isStatic && lambdaArity < 0 && (expression == null |
| 1584 | + !isStatic |
| 1585 | + && (lambdaArity < 0 |
| 1586 | + && (expression == null |
1583 | 1587 | ? !areEqual(declaringClass, class_typeBinding) |
1584 | 1588 | && !class_typeBinding.isAssignmentCompatible(declaringClass) |
1585 | | - : expression instanceof ThisExpression && ((ThisExpression) expression).getQualifier() != null) || class_localType == LAMBDA_EXPRESSION); |
| 1589 | + : expression instanceof ThisExpression |
| 1590 | + && ((ThisExpression) expression).getQualifier() != null) |
| 1591 | + || class_localType == LAMBDA_EXPRESSION) |
| 1592 | + ); |
1586 | 1593 | String bname = (needBname ? getThisRefOrSyntheticReference(javaQualifier, declaringClass, null) : null); |
1587 | 1594 | // add the qualifier |
1588 | 1595 | int pt = buffer.length(); |
@@ -4879,7 +4886,7 @@ private void addQualifiedNameForBinding(IVariableBinding varBinding, boolean isS |
4879 | 4886 | * |
4880 | 4887 | * For general fields, this will be "this.". |
4881 | 4888 | * |
4882 | | - * For fields in outer classes, we need a synthetic references, |
| 4889 | + * For nonstatic fields in outer classes, we need a synthetic references, |
4883 | 4890 | * this.b$[className] that points to the outer object, which may be one or more |
4884 | 4891 | * levels higher than this one. |
4885 | 4892 | * |
|
0 commit comments