Project

General

Profile

Bug #66

Instantiation of template object in client module failed

Added by Yaroslav Romanchenko 8 months ago. Updated 8 months ago.

Status:
New
Priority:
Normal
Category:
Compiler

Description

All three modules compiled, but, running of C.Do failed.
Message in Kernel log appears:

could not get module while importing A(@Size64,B(@Float32,C_L_FL32)_L_SZ)
    A(@Size64,B(@Float32,C_L_FL32)_L_SZ).O in B(@Float32,C_L_FL32).@CodeSections: error: unresolved

MODULE A(TYPE T, CONST L);
TYPE
    O* = OBJECT
    END O;
END A.

MODULE B(TYPE T, CONST L);
IMPORT
    A := A(T,L), A_SZ := A(SIZE, L_SZ);
TYPE
    O* = OBJECT(A.O)
    VAR
        osz : A_SZ.O;
    PROCEDURE &New*;
    BEGIN
        NEW(osz)
    END New;
    END O;
    PROCEDURE L_SZ(s1, s2: SIZE): BOOLEAN;
    BEGIN
    END L_SZ;
END B.

MODULE C;
IMPORT
    A_FL32 := A(FLOAT32, L_FL32),
    B_FL32 := B(FLOAT32, L_FL32);
    PROCEDURE Do*;
    VAR
        a: A_FL32.O;
        b: B_FL32.O;
    BEGIN
        NEW(a);
        NEW(b);
    END Do;
    PROCEDURE L_FL32(f1, f2: FLOAT32): BOOLEAN;
    BEGIN
    END L_FL32;
END C.Do ~

History

#1 Updated by Felix Friedrich 8 months ago

  • Category set to Compiler

Also available in: Atom PDF