Prexonite, a .NET hosted scripting language with a focus on meta-programming and embedded DSLs
0

Configure Feed

Select the types of activity you want to include in your feed.

PRX-47 ensure `name x:y/2.0;` is a compile error

This PR adds two unit tests that try to replicate the issue, but the compiler _does already_ raise an error message.

Christian Klauser (Apr 27, 2021, 10:47 PM +0200) a48de581 42ab8c0a

+18
+18
PrexoniteTests/Tests/Translation.cs
··· 1388 1388 "); 1389 1389 Expect(SymbolInterpretations.Function); 1390 1390 } 1391 + 1392 + [Test] 1393 + public void ErrorSingleColonInMetaValue() 1394 + { 1395 + CompileInvalid(@" 1396 + // There is a typo in this declaration: single `:` instead of `::`. 1397 + name psr::pattern:test/2.0; 1398 + "); 1399 + } 1400 + 1401 + [Test] 1402 + public void ErrorSingleColonInMetaValue2() 1403 + { 1404 + CompileInvalid(@" 1405 + // There is a typo in this declaration: single `:` instead of `.` (this can happen on German keyboards) 1406 + name psr.pattern:test/2.0; 1407 + "); 1408 + } 1391 1409 1392 1410 [ContractAnnotation("value:null=>halt")] 1393 1411 private static void _assumeNotNull(object value)