Skip to main content

L1332 - Record Already Imported

Error

-module(main).
-import_record(other, [point]).
-record(#point {x, y}).
%% ^^^^^^^^^^^^^^ error: record point already imported from other

Explanation

The error occurs when a native record (EEP-79) is defined with a name that has already been brought into scope by an -import_record attribute.

Within a module a record name must be unambiguous, so it cannot refer both to an imported native record and to a locally defined one. To fix the error, either remove the local definition and use the imported record, or rename one of them.