I would say, "sweet things in general" is actually, "sweetness":
Spanish and Portuguese, whose o/os/a/as inflections commonly mark both adjectives and nouns, shows a very permeable boundary as many roots straddle the lexical categories of adjective and noun (with little or no inflectional difference).
It would seem that both "doce" and "sweetness" are nominalized forms (aka, nominalizations)
Exactly what I thought. From the discussion here, all people are talking about "doce" as a noun, not an adjective; so is the DL answer. If "doce" is considered as a noun, then it is in the wrong section. If "doce" is considered as an adj, I also wonder if "gostar de" can be followed by an adj. Untill now, I've never seen "gostar de + adj". 12/04/2017
"To eat" (or however it's liked) would be implied in both languages making "flies like sweets" more correct as a translation, wouldn't it? Adding "to eat" seems like adding too much to the translation (things that may or may not be implied) and should be counted as incorrect when learning IMO.
Actually, here is how it works (going for American English here):
Bombom -- Chocolate bonbon (specific candy)
Doce -- Sweet (just as in English, it is also used for the "sweet" flavor or quality... or singular form of "sweets")
Doces -- Sweets (sweet treats, not necessarily candy, but possibly. Could be truffles, brigadeiros, marmalade, usually softer than candy)
Bala -- Candy, specifically. Pre-packaged, or harder candy usually (this is singular. add an s for plural)
Pastilha -- Mint (usually called "pastilha de hortelã" -- hortelã is a type of mint flavor)
Sobremesa -- Dessert.
Flies do indeed like "doce". But we usually call sweets and candies by name, just as in English (doughnut, lemon pie, mentos, brigadeiro, quindim, chocolate cake, cany cane, bala de coco, etc.)
It comes up on Linguee. Though as usual the Brazilian variant tends to avoid the plural here which the Euro sort does not (making it more similar to English in this regard):
OK, things don't always translate cleanly from language to language. Give that, there should be a bit more latitude in accepting what might be considered less than standard usage in English to convey the Portuguese meaning, which is after all what we are primarily concerned with. (In other words, I used the singular "sweet" in English getting across the meaning of the original sentence. It seems to me that the Portuguese sentence is broader than the simple preference or not for "sweets" or "candy". Please let me know if I'm wrong about that understanding.)