From c51a6d3e573934379547f1e7319bd3f5421ac29a Mon Sep 17 00:00:00 2001
From: Pedro Miguel Domingos da Costa <pmdcosta@outlook.com>
Date: Thu, 29 Mar 2018 07:24:45 +0100
Subject: [PATCH] Fix compile output name (#58)

* Fix output file name

* Bump version
---
 VERSION                     | 2 +-
 pkg/vm/compiler/compiler.go | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/VERSION b/VERSION
index 7b52f5e51..731b95d7f 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.35.0
+0.35.1
diff --git a/pkg/vm/compiler/compiler.go b/pkg/vm/compiler/compiler.go
index 786c1ac5b..28dfa0a3d 100644
--- a/pkg/vm/compiler/compiler.go
+++ b/pkg/vm/compiler/compiler.go
@@ -75,6 +75,7 @@ func CompileAndSave(src string, o *Options) error {
 	if !strings.HasSuffix(src, ".go") {
 		return fmt.Errorf("%s is not a Go file", src)
 	}
+	o.Outfile = strings.TrimSuffix(o.Outfile, fmt.Sprintf(".%s", fileExt))
 	if len(o.Outfile) == 0 {
 		o.Outfile = strings.TrimSuffix(src, ".go")
 	}