Browse thread
warning on value shadowing
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | skaller <skaller@u...> |
| Subject: | Re: [Caml-list] warning on value shadowing |
On Wed, 2007-02-21 at 13:51 -0800, David Brown wrote: > >>> Proposal: When both foo.ml and bar.ml define zot and quux.ml opens > >>> both Foo and Bar, there should be a warning [..] > One could also argue that this condition is an error. IMHO, only an error on use of the ambiguous name. It should be a hard error then. It can be resolved by qualification. I don't believe this is inconsistent with deliberate hiding like let x = e in let x = x + 1 in .. indeed this can also be used to resolve a conflict: open A open B let x = A.x -- John Skaller <skaller at users dot sf dot net> Felix, successor to C++: http://felix.sf.net