@abaplint/core 2.113.171 → 2.113.172
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.
|
@@ -55,9 +55,11 @@ class NewObject {
|
|
|
55
55
|
if (ret === undefined) {
|
|
56
56
|
const objDefinition = input.scope.findObjectDefinition(typeName);
|
|
57
57
|
if (objDefinition) {
|
|
58
|
+
const objref = new basic_1.ObjectReferenceType(objDefinition);
|
|
59
|
+
const tid = new _typed_identifier_1.TypedIdentifier(typeToken, input.filename, objref);
|
|
60
|
+
input.scope.addReference(typeToken, tid, _reference_1.ReferenceType.InferredType, input.filename);
|
|
58
61
|
input.scope.addReference(typeToken, objDefinition, _reference_1.ReferenceType.ObjectOrientedReference, input.filename);
|
|
59
62
|
input.scope.addReference(typeToken, objDefinition, _reference_1.ReferenceType.ConstructorReference, input.filename, { ooName: objDefinition.getName() });
|
|
60
|
-
const objref = new basic_1.ObjectReferenceType(objDefinition);
|
|
61
63
|
const clas = input.scope.findClassDefinition(objref.getIdentifierName());
|
|
62
64
|
if ((clas === null || clas === void 0 ? void 0 : clas.isAbstract()) === true) {
|
|
63
65
|
const message = clas.getName() + " is abstract, cannot be instantiated";
|
|
@@ -299,12 +299,12 @@ class Source {
|
|
|
299
299
|
const basic = new basic_types_1.BasicTypes(input);
|
|
300
300
|
const typeExpression = node.findDirectExpression(Expressions.TypeNameOrInfer);
|
|
301
301
|
const typeToken = typeExpression === null || typeExpression === void 0 ? void 0 : typeExpression.getFirstToken();
|
|
302
|
-
const typeName = typeToken
|
|
302
|
+
// const typeName = typeToken?.getStr();
|
|
303
303
|
/*
|
|
304
304
|
console.dir(inferredType);
|
|
305
305
|
console.dir(typeToken);
|
|
306
306
|
*/
|
|
307
|
-
if (
|
|
307
|
+
if (inferredType && typeToken) {
|
|
308
308
|
const found = basic.lookupQualifiedName(inferredType.getQualifiedName());
|
|
309
309
|
if (found) {
|
|
310
310
|
const tid = new _typed_identifier_1.TypedIdentifier(typeToken, input.filename, inferredType);
|
package/build/src/registry.js
CHANGED