Map
Index
Random
Help
th

Quote: a covariant rule for subtyping arrays requires a run time type check for array stores; otherwise can copy a larger element into a smaller element

topics > all references > references c-d > QuoteRef: deanD5_1996 , p. 191



Topic:
range checking

Quotation Skeleton

the [Java] type system uses a covariant [ref] rule for subtyping arrays, so array stores require run time … [footnote, p 192] For example, suppose that A is a … [] … is a subtype of B[]. Now the following … [] x, B y) { x[0]=y; }' … The body of 'proc' is not type-safe if … [] and the value of y passed in by the caller …   Google-1   Google-2

Copyright clearance needed for quotation.


Related Topics up

Topic: range checking (20 items)

Copyright © 2002-2008 by C. Bradford Barber. All rights reserved.
Thesa is a trademark of C. Bradford Barber.