cdew / omnithreadlibrary

Automatically exported from code.google.com/p/omnithreadlibrary
0 stars 0 forks source link

TOmniValue.CreateNamed does not handle single character string literals #64

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
{$APPTYPE CONSOLE}

uses
  OtlCommon;

var
  Value: TOmniValue;

begin
  Value := TOmniValue.CreateNamed([
    string('a'), 42,
    string('b'), 666
  ]);
  Writeln(Value['a'].AsString);
  Writeln(Value['b'].AsString);
end.

I expect the output to be:

42
666

Instead an error is raised:

    TOmniValue.CreateNamed: invalid name type

The issue is that TOmniValue.CreateNamed fails to handle vtWideChar.  See 
http://stackoverflow.com/q/23995138

Original issue reported on code.google.com by david.h...@gmail.com on 2 Jun 2014 at 1:03

GoogleCodeExporter commented 9 years ago

Original comment by gabr42 on 17 Apr 2015 at 5:49