Cannot call TypeOf on a Value

5 views
Skip to first unread message

Al Mo

unread,
Jun 4, 2020, 11:13:53 AM6/4/20
to v8-dev
Hi,

On the documentation (the most recent one) there is a function TypeOf that can be called on Values which returns a string with a similar output of calling `typeof object` in JS (I presume?) ...

However, when I try to use it on a v8::Local<v8::Value>, I get the following error at compile time:

main.cc:11:11: error: class v8::Local<v8::Value>’ has no member named ‘TypeOf


Is this not implemented yet?

Alex.

Al Mo

unread,
Jun 4, 2020, 11:15:49 AM6/4/20
to v8-...@googlegroups.com

--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/d3c5da31-30a9-4c96-a390-b28467622aeb%40googlegroups.com.

Al Mo

unread,
Jun 4, 2020, 11:21:48 AM6/4/20
to v8-...@googlegroups.com
Please ignore, I found my mistake,

Best day to all!
Alex.

Leszek Swirski

unread,
Jun 4, 2020, 11:24:31 AM6/4/20
to v8-dev
Glad to hear you found your mistake; for anyone else having a similar problem and finding this through a search or whatever: they were probably using . instead of ->

Specifically, for v8::Local<v8::Value> foo, one has to do foo->TypeOf() to access v8::Value::TypeOf, otherwise it's trying to access v8::Local::TypeOf.

Reply all
Reply to author
Forward
0 new messages