From 89072772907ece3f1e3cdcfa2145feee8b38cc04 Mon Sep 17 00:00:00 2001 From: otya128 Date: Sun, 4 Dec 2016 16:37:19 +0900 Subject: [PATCH] Disallow to define label from direct mode --- SMILEBASIC/compiler.d | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SMILEBASIC/compiler.d b/SMILEBASIC/compiler.d index 5b3d6cd..beae89e 100644 --- a/SMILEBASIC/compiler.d +++ b/SMILEBASIC/compiler.d @@ -929,6 +929,10 @@ class Compiler break; case NodeType.Label: { + if (this.isDirectMode) + { + throw new CantUseFromDirectMode(); + } auto label = cast(Label)i; if(s.func) {