unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#23282: 24.5; eieio class unexpected behaviour
@ 2016-04-13  8:00 Tom
  2016-05-15 15:18 ` Noam Postavsky
  0 siblings, 1 reply; 2+ messages in thread
From: Tom @ 2016-04-13  8:00 UTC (permalink / raw)
  To: 23282

In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
  of 2016-01-05 on Tom-Fujitsu
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description:    Ubuntu 14.04.4 LTS

Important settings:
   value of $LANG: en_HK.UTF-8
   value of $XMODIFIERS: @im=ibus
   locale-coding-system: utf-8-unix

Memory information:
((conses 16 320884 19487)
  (symbols 48 38512 1)
  (miscs 40 632 687)
  (strings 32 78047 9931)
  (string-bytes 1 2243922)
  (vectors 16 32952)
  (vector-slots 8 675268 10887)
  (floats 8 629 636)
  (intervals 56 4725 390)
  (buffers 960 23)
  (heap 1024 35485 1572))


(defclass testclass ()
   ((num :initform 1
         :protection :private
         :accessor testclass.num)))

(setq my-test (make-instance 'testclass))

(eieio-oref my-test 'num)
;; ==> Error because of private

(testclass.num my-test)
;; ==> 1, Can get a private value!!

Accessor should be unable to access private data.

-- 
Regards
Tom Tang






^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#23282: 24.5; eieio class unexpected behaviour
  2016-04-13  8:00 bug#23282: 24.5; eieio class unexpected behaviour Tom
@ 2016-05-15 15:18 ` Noam Postavsky
  0 siblings, 0 replies; 2+ messages in thread
From: Noam Postavsky @ 2016-05-15 15:18 UTC (permalink / raw)
  To: 23282

tags 23282 + wontfix
close 23282
quit

It's documented in the EIEIO manual that the :protection slot has no effect.

(info "(eieio) Slot Options")

‘:protection’
     This is an old option that is not supported any more.
[...]
     This protection is not enforced by the code any more, so it’s only
     useful as documentation.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-15 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-13  8:00 bug#23282: 24.5; eieio class unexpected behaviour Tom
2016-05-15 15:18 ` Noam Postavsky

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).