An operator can be declared Import (Intrinsic) only if the current
view of the
operand type (s) is a numeric type. With this patch the compiler
properly
rejects the pragma if the operand type is private or incomplete.
Compiling mysystem.ads must yield:
mysystem.ads:3:13: intrinsic operator can only apply to numeric
types
mysystem.ads:7:13: intrinsic operator can only apply to numeric
types
mysystem.ads:7:18: invalid use of incomplete type "Self"
---
package Mysystem is
type A is private;
function "<" (Left, Right : A) return Boolean;
pragma Import (Intrinsic, "<");
type Self;
function "+" (X, Y : Self) return Boolean;
pragma Import (Intrinsic, "+");
type Self is tagged null record;
private
type A is mod 2 ** 32;
end Mysystem;