ID:2096520
 
BYOND Version:510.1345
Operating System:Linux
Web Browser:Chrome 51.0.2704.63
Applies to:Dream Maker
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary:
Comments in embedded expressions are inconsistent and strange.

Numbered Steps to Reproduce Problem:
See code.

Code Snippet (if applicable) to Reproduce Problem:
(Each of these definitions must be compiled *on its own* to show the errors described; they interfere with each other)
/world/New()
world.log << "foo [//]" // This is fine; prints "foo"

// ##########

/world/New()
var/x = "foo [//]" // error: location of top-most unmatched {
world.log << x
// error: end of file: expected }

// ##########

/world/New()
world.log << "foo [//] bar" // error: bad embedded expression [//] ba]

(the "bad embedded expression" error is wrong because of http://www.byond.com/forum/?post=2067206; it is unrelated to this bug AFAICT)

Expected Results:
One of:
- line comments in embedded expressions would comment until the end of the embedded expression
- comments in embedded expressions would cause a compilation error in all cases

Actual Results:
Line comments in embedded expressions compile iff the string is the final code in the block and the expression is not followed by more text in the string.

Does the problem occur:
Every time? Or how often? Every time
In other games? N/A
In other user accounts? Unknown
On other computers? Unknown

When does the problem NOT occur? Unknown

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? Unknown

Workarounds: Don't be me and find weird bugs.

You're right; I think all three of these are broken. The middle one is closest to correct, but it should be an unmatched bracket, not an unmatched brace.