comp.lang.ada
 help / color / mirror / Atom feed
From: firth@sei.cmu.edu (Robert Firth)
Subject: Re: Conformance rules question
Date: 28 Apr 88 12:22:39 GMT	[thread overview]
Message-ID: <5271@aw.sei.cmu.edu> (raw)
In-Reply-To: 1103@augusta.UUCP

In article <1103@augusta.UUCP> bs@augusta.UUCP (Burch Seymour) writes:
  In the following code package paramtest will compile without error
  even though the string initialization values in the spec and body
  do not match. Package paramtest2, which uses an integer argument
  with different values will fail. What is the rational behind this?
  
  --------------------------------------------------------------
  package paramtest is
    procedure string_in ( a_string : in string := "default value");
  end paramtest;
  
  package body paramtest is
    procedure string_in ( a_string : in string := "other default value") is
      begin
       null;
    end string_in;
  end paramtest;

There is no rationale; this is a compiler bug.  [RM 6.3.1] gives the
rules that permit the two specifications to differ, and the kind of
difference shown here is not allowed by them.

      reply	other threads:[~1988-04-28 12:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1988-04-27 14:08 Conformance rules question Burch Seymour
1988-04-28 12:22 ` Robert Firth [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox