This commit is contained in:
Hackerpilot 2017-03-07 16:12:27 -08:00
parent 9fb13d0caf
commit 019d42a4dc
6 changed files with 14 additions and 3 deletions

View File

@ -4,6 +4,6 @@
"targetType": "executable", "targetType": "executable",
"license": "BSL-1.0", "license": "BSL-1.0",
"dependencies": { "dependencies": {
"libdparse": "~>0.7.0-beta.6" "libdparse": "~>0.7.1-beta.1"
} }
} }

@ -1 +1 @@
Subproject commit ca51bd13cf68646eaf9d6987db100cc3b288cffe Subproject commit eb8309c9cd4272ec130c13d7f1addafe2b03edec

View File

@ -1038,7 +1038,7 @@ private:
regenLineBreakHintsIfNecessary(index); regenLineBreakHintsIfNecessary(index);
goto binary; goto binary;
case tok!"~": case tok!"~":
if (peekIs(tok!"this")) if (peekIs(tok!"this") && peek2Is(tok!"("))
{ {
if (!(index == 0 || peekBackIs(tok!"{", true) if (!(index == 0 || peekBackIs(tok!"{", true)
|| peekBackIs(tok!"}", true) || peekBackIs(tok!";", true))) || peekBackIs(tok!"}", true) || peekBackIs(tok!";", true)))

View File

@ -0,0 +1,4 @@
void main()
{
writeln("Expected " ~ descStr(type, data) ~ " but got " ~ this.descStr);
}

4
tests/issue0273.d Normal file
View File

@ -0,0 +1,4 @@
void main()
{
writeln("Expected " ~ descStr( type, data ) ~ " but got " ~ this.descStr);
}

View File

@ -0,0 +1,3 @@
void main() {
writeln("Expected " ~ descStr(type, data) ~ " but got " ~ this.descStr);
}