From 97c7b417342e8c941aedfaf811fab0332718cd01 Mon Sep 17 00:00:00 2001 From: Barney Moss Date: Thu, 10 Dec 2015 02:37:18 -0800 Subject: [PATCH] Unit test showing array assignment problem on gcc 4.9 Summary: Unit test showing array assignment problem on gcc 4.9 Reviewed By: lbrandy Differential Revision: D2739900 fb-gh-sync-id: 6b0fde956672b8248fbd4e620fd112195c45c646 --- folly/test/DynamicTest.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/folly/test/DynamicTest.cpp b/folly/test/DynamicTest.cpp index f9360f02..83e21cf6 100644 --- a/folly/test/DynamicTest.cpp +++ b/folly/test/DynamicTest.cpp @@ -229,6 +229,16 @@ TEST(Dynamic, DeepCopy) { EXPECT_EQ(obj2.at("a"), expected); } +TEST(Dynamic, ArrayReassignment) { + dynamic o = 1; + + dynamic d1 = {o}; + EXPECT_EQ(dynamic::ARRAY, d1.type()); + + d1 = {o}; + EXPECT_EQ(dynamic::ARRAY, d1.type()); +} + TEST(Dynamic, Operator) { bool caught = false; try { -- 2.34.1